chore: rename ICONNAME to VIDEO_ICON_NAME
This commit is contained in:
parent
49e46bb513
commit
cd8b1b7e40
|
@ -33,7 +33,7 @@
|
|||
#include <QGSettings>
|
||||
#include <qt5-ukui/highlight-effect.h>
|
||||
|
||||
static const char* ICONNAME = "video-x-generic-symbolic";
|
||||
static const char* VIDEO_ICON_NAME = "video-x-generic-symbolic";
|
||||
static const char* THEME_SCHEMAS = "org.ukui.style";
|
||||
|
||||
namespace {
|
||||
|
@ -154,11 +154,11 @@ void GestureWidget::onStyleChanged()
|
|||
|
||||
void GestureWidget::onIconThemeChanged()
|
||||
{
|
||||
if(!QIcon::hasThemeIcon(ICONNAME)) {
|
||||
qWarning() << "Can't find icon" << ICONNAME << "from theme";
|
||||
if(!QIcon::hasThemeIcon(VIDEO_ICON_NAME)) {
|
||||
qWarning() << "Can't find icon" << VIDEO_ICON_NAME << "from theme";
|
||||
return;
|
||||
}
|
||||
QIcon play = QIcon::fromTheme(ICONNAME);
|
||||
QIcon play = QIcon::fromTheme(VIDEO_ICON_NAME);
|
||||
m_playIcon->setPixmap(play.pixmap(QSize(16, 16)));
|
||||
}
|
||||
|
||||
|
@ -173,8 +173,8 @@ QLabel* GestureWidget::createPlayIconLabel()
|
|||
// 上边距设为 1 是为了让图标居中,可能是 QT 的 bug
|
||||
playIcon->setContentsMargins(0, 1, 0, 0);
|
||||
|
||||
if(QIcon::hasThemeIcon(ICONNAME)) {
|
||||
QIcon play = QIcon::fromTheme(ICONNAME);
|
||||
if(QIcon::hasThemeIcon(VIDEO_ICON_NAME)) {
|
||||
QIcon play = QIcon::fromTheme(VIDEO_ICON_NAME);
|
||||
playIcon->setPixmap(play.pixmap(QSize(16, 16)));
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ void IconLabelStyle::drawControl(ControlElement element, const QStyleOption *opt
|
|||
return QProxyStyle::drawControl(element, option, painter, widget);
|
||||
}
|
||||
|
||||
QIcon play = QIcon::fromTheme(ICONNAME);
|
||||
QIcon play = QIcon::fromTheme(VIDEO_ICON_NAME);
|
||||
QPixmap pixmap = HighLightEffect::ordinaryGeneratePixmap(play.pixmap(QSize(16, 16)),
|
||||
option, widget);
|
||||
|
||||
|
|
Loading…
Reference in New Issue