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

[Linux theme] Small tweaks in locationbar icons.

Using theme icon for GoIcon. Removed explicitly setting padding.
This commit is contained in:
nowrep 2013-04-26 23:40:54 +02:00
parent 6492b2ac87
commit 90ccae62f2
3 changed files with 17 additions and 8 deletions

View File

@ -76,7 +76,7 @@
qproperty-iconSize: 24px 24px;
}
#navigation-button-supermenu::menu-indicator
#navigation-button-supermenu::menu-indicator
{
image: none;
}
@ -136,7 +136,6 @@ IconProvider
#locationbar-bookmarkicon
{
margin-bottom: 2px;
qproperty-pixmap: url(images/star.png);
}
@ -154,25 +153,23 @@ IconProvider
#locationbar-rss-icon
{
margin-bottom:2px;
qproperty-pixmap: url(images/rss.png);
}
#locationbar-goicon
{
margin-bottom:2px;
qproperty-pixmap: url(images/gotoaddress.png);
qproperty-fixedsize: 16px 16px;
qproperty-themeIcon: "go-jump-locationbar";
qproperty-fallbackIcon: url(images/gotoaddress.png);
}
#locationbar-down-icon
{
margin-bottom: 1px;
qproperty-pixmap: url(images/navigation-dropdown.png);
}
#locationbar-autofillicon
{
margin-bottom: 1px;
qproperty-pixmap: url(images/key.png);
}

View File

@ -30,10 +30,19 @@ void ClickableLabel::setThemeIcon(const QString &name)
QIcon icon = QIcon::fromTheme(name);
if (!icon.isNull()) {
adjustSize();
setPixmap(icon.pixmap(size()));
}
}
void ClickableLabel::setFallbackIcon(const QIcon &image)
{
if (pixmap()->isNull()) {
adjustSize();
setPixmap(image.pixmap(size()));
}
}
QString ClickableLabel::themeIcon() const
{
return m_themeIcon;

View File

@ -31,12 +31,15 @@ class QT_QUPZILLA_EXPORT ClickableLabel : public QLabel
Q_PROPERTY(int fixedwidth READ width WRITE setFixedWidth)
Q_PROPERTY(int fixedheight READ height WRITE setFixedHeight)
Q_PROPERTY(QString themeIcon READ themeIcon WRITE setThemeIcon)
Q_PROPERTY(QIcon fallbackIcon WRITE setFallbackIcon)
public:
explicit ClickableLabel(QWidget* parent = 0);
void setThemeIcon(const QString &name);
QString themeIcon() const;
void setThemeIcon(const QString &name);
void setFallbackIcon(const QIcon &image);
signals:
void clicked(QPoint);