1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[ToolButton] Added property "toolbar-look"

This property makes it possible for themes to customize look of
additional ToolButtons in Navigation Toolbar.
This commit is contained in:
David Rosca 2014-04-20 09:32:35 +02:00
parent 1fd3d84320
commit d25847cfce
2 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,7 @@ NavigationBar::NavigationBar(BrowserWindow* window)
m_navigationSplitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); m_navigationSplitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
m_navigationSplitter->setCollapsible(0, false); m_navigationSplitter->setCollapsible(0, false);
m_exitFullscreen = new ToolButton(); m_exitFullscreen = new ToolButton(this);
m_exitFullscreen->setObjectName("navigation-button-exitfullscreen"); m_exitFullscreen->setObjectName("navigation-button-exitfullscreen");
m_exitFullscreen->setToolTip(tr("Exit Fullscreen")); m_exitFullscreen->setToolTip(tr("Exit Fullscreen"));
m_exitFullscreen->setToolButtonStyle(Qt::ToolButtonIconOnly); m_exitFullscreen->setToolButtonStyle(Qt::ToolButtonIconOnly);

View File

@ -129,6 +129,10 @@ void ToolButton::setToolbarButtonLook(bool enable)
else { else {
m_options &= ~ToolBarLookOption; m_options &= ~ToolBarLookOption;
} }
setProperty("toolbar-look", QVariant(enable));
style()->unpolish(this);
style()->polish(this);
} }
void ToolButton::menuAboutToHide() void ToolButton::menuAboutToHide()