mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
[Theme] Use theme icon for Exit Fullscreen button in toolbar
This commit is contained in:
parent
5e0db8fe13
commit
c84f3d2366
@ -102,6 +102,11 @@
|
||||
qproperty-multiIcon: url(images/navigation-supermenu.png);
|
||||
}
|
||||
|
||||
#navigation-button-exitfullscreen
|
||||
{
|
||||
qproperty-themeIcon: "view-restore";
|
||||
}
|
||||
|
||||
/*TabWidget*/
|
||||
#tabbar::scroller
|
||||
{
|
||||
|
@ -100,6 +100,11 @@
|
||||
qproperty-icon: url(images/navigation-supmenu.png);
|
||||
}
|
||||
|
||||
#navigation-button-exitfullscreen
|
||||
{
|
||||
qproperty-themeIcon: "view-restore";
|
||||
}
|
||||
|
||||
/*TabWidget*/
|
||||
#tabbar::tab
|
||||
{
|
||||
|
@ -69,6 +69,11 @@
|
||||
qproperty-fallbackIcon: url(images/preferences-desktop.png);
|
||||
}
|
||||
|
||||
#navigation-button-exitfullscreen
|
||||
{
|
||||
qproperty-themeIcon: "view-restore";
|
||||
}
|
||||
|
||||
#navigation-button-supermenu::menu-indicator
|
||||
{
|
||||
image: none;
|
||||
|
@ -97,6 +97,11 @@
|
||||
qproperty-multiIcon: url(images/navigation-supermenu.png);
|
||||
}
|
||||
|
||||
#navigation-button-exitfullscreen
|
||||
{
|
||||
qproperty-themeIcon: "view-restore";
|
||||
}
|
||||
|
||||
/*TabWidget*/
|
||||
#tabbar::scroller
|
||||
{
|
||||
|
@ -107,6 +107,11 @@
|
||||
qproperty-iconSize: 23px 22px;
|
||||
}
|
||||
|
||||
#navigation-button-exitfullscreen
|
||||
{
|
||||
qproperty-themeIcon: "view-restore";
|
||||
}
|
||||
|
||||
/*TabWidget*/
|
||||
#tabbar::scroller
|
||||
{
|
||||
|
@ -80,5 +80,6 @@
|
||||
<file>icons/theme/expand.png</file>
|
||||
<file>icons/theme/collapse.png</file>
|
||||
<file>icons/theme/speeddial.png</file>
|
||||
<file>icons/theme/view-restore.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
src/lib/data/icons/theme/view-restore.png
Normal file
BIN
src/lib/data/icons/theme/view-restore.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 469 B |
@ -149,10 +149,13 @@ NavigationBar::NavigationBar(QupZilla* mainClass)
|
||||
m_navigationSplitter->setCollapsible(0, false);
|
||||
|
||||
m_exitFullscreen = new ToolButton();
|
||||
m_exitFullscreen->setText(tr("Exit Fullscreen"));
|
||||
m_exitFullscreen->setObjectName("navigation-button-exitfullscreen");
|
||||
m_exitFullscreen->setToolTip(tr("Exit Fullscreen"));
|
||||
m_exitFullscreen->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
m_exitFullscreen->setFocusPolicy(Qt::NoFocus);
|
||||
m_exitFullscreen->setAutoRaise(true);
|
||||
m_exitFullscreen->setVisible(false);
|
||||
setButtonIconSize(m_exitFullscreen);
|
||||
|
||||
m_layout->addLayout(backNextLayout);
|
||||
m_layout->addWidget(m_reloadStop);
|
||||
|
@ -196,6 +196,8 @@ QIcon IconProvider::standardIcon(QStyle::StandardPixmap icon)
|
||||
|
||||
QIcon IconProvider::fromTheme(const QString &icon)
|
||||
{
|
||||
// TODO: This should actually look in :icons/theme for fallback icon, not hardcode every icon
|
||||
|
||||
if (icon == QLatin1String("go-home")) {
|
||||
return QIcon::fromTheme("go-home", QIcon(":/icons/theme/home.png"));
|
||||
}
|
||||
@ -217,6 +219,9 @@ QIcon IconProvider::fromTheme(const QString &icon)
|
||||
else if (icon == QLatin1String("go-previous")) {
|
||||
return QIcon::fromTheme("go-previous", QIcon(":icons/theme/go-previous.png"));
|
||||
}
|
||||
else if (icon == QLatin1String("view-restore")) {
|
||||
return QIcon::fromTheme("view-restore", QIcon(":icons/theme/view-restore.png"));
|
||||
}
|
||||
else {
|
||||
return QIcon::fromTheme(icon);
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* ============================================================ */
|
||||
#include "toolbutton.h"
|
||||
#include "iconprovider.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QMenu>
|
||||
@ -35,7 +36,7 @@ ToolButton::ToolButton(QWidget* parent)
|
||||
void ToolButton::setThemeIcon(const QString &image)
|
||||
{
|
||||
m_themeIcon = image;
|
||||
setIcon(QIcon::fromTheme(image));
|
||||
setIcon(qIconProvider->fromTheme(image));
|
||||
m_usingMultiIcon = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user