mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[Linux theme] Small tweaks in locationbar icons.
Using theme icon for GoIcon. Removed explicitly setting padding.
This commit is contained in:
parent
6492b2ac87
commit
90ccae62f2
@ -136,7 +136,6 @@ IconProvider
|
|||||||
|
|
||||||
#locationbar-bookmarkicon
|
#locationbar-bookmarkicon
|
||||||
{
|
{
|
||||||
margin-bottom: 2px;
|
|
||||||
qproperty-pixmap: url(images/star.png);
|
qproperty-pixmap: url(images/star.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,25 +153,23 @@ IconProvider
|
|||||||
|
|
||||||
#locationbar-rss-icon
|
#locationbar-rss-icon
|
||||||
{
|
{
|
||||||
margin-bottom:2px;
|
|
||||||
qproperty-pixmap: url(images/rss.png);
|
qproperty-pixmap: url(images/rss.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#locationbar-goicon
|
#locationbar-goicon
|
||||||
{
|
{
|
||||||
margin-bottom:2px;
|
qproperty-fixedsize: 16px 16px;
|
||||||
qproperty-pixmap: url(images/gotoaddress.png);
|
qproperty-themeIcon: "go-jump-locationbar";
|
||||||
|
qproperty-fallbackIcon: url(images/gotoaddress.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#locationbar-down-icon
|
#locationbar-down-icon
|
||||||
{
|
{
|
||||||
margin-bottom: 1px;
|
|
||||||
qproperty-pixmap: url(images/navigation-dropdown.png);
|
qproperty-pixmap: url(images/navigation-dropdown.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#locationbar-autofillicon
|
#locationbar-autofillicon
|
||||||
{
|
{
|
||||||
margin-bottom: 1px;
|
|
||||||
qproperty-pixmap: url(images/key.png);
|
qproperty-pixmap: url(images/key.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,10 +30,19 @@ void ClickableLabel::setThemeIcon(const QString &name)
|
|||||||
QIcon icon = QIcon::fromTheme(name);
|
QIcon icon = QIcon::fromTheme(name);
|
||||||
|
|
||||||
if (!icon.isNull()) {
|
if (!icon.isNull()) {
|
||||||
|
adjustSize();
|
||||||
setPixmap(icon.pixmap(size()));
|
setPixmap(icon.pixmap(size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClickableLabel::setFallbackIcon(const QIcon &image)
|
||||||
|
{
|
||||||
|
if (pixmap()->isNull()) {
|
||||||
|
adjustSize();
|
||||||
|
setPixmap(image.pixmap(size()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString ClickableLabel::themeIcon() const
|
QString ClickableLabel::themeIcon() const
|
||||||
{
|
{
|
||||||
return m_themeIcon;
|
return m_themeIcon;
|
||||||
|
@ -31,12 +31,15 @@ class QT_QUPZILLA_EXPORT ClickableLabel : public QLabel
|
|||||||
Q_PROPERTY(int fixedwidth READ width WRITE setFixedWidth)
|
Q_PROPERTY(int fixedwidth READ width WRITE setFixedWidth)
|
||||||
Q_PROPERTY(int fixedheight READ height WRITE setFixedHeight)
|
Q_PROPERTY(int fixedheight READ height WRITE setFixedHeight)
|
||||||
Q_PROPERTY(QString themeIcon READ themeIcon WRITE setThemeIcon)
|
Q_PROPERTY(QString themeIcon READ themeIcon WRITE setThemeIcon)
|
||||||
|
Q_PROPERTY(QIcon fallbackIcon WRITE setFallbackIcon)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClickableLabel(QWidget* parent = 0);
|
explicit ClickableLabel(QWidget* parent = 0);
|
||||||
|
|
||||||
void setThemeIcon(const QString &name);
|
|
||||||
QString themeIcon() const;
|
QString themeIcon() const;
|
||||||
|
void setThemeIcon(const QString &name);
|
||||||
|
|
||||||
|
void setFallbackIcon(const QIcon &image);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void clicked(QPoint);
|
void clicked(QPoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user