forked from qt-creator/qt-creator
QmlDesignerIconProvider: Make use of FilePath
for constructing icon file paths.
Amends c17c805e43
Change-Id: I779cbf4525fb355878aaf0d9795702d951d60b70
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -42,12 +42,10 @@ QmlDesignerIconProvider::QmlDesignerIconProvider()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString iconPath()
|
static Utils::FilePath iconPath()
|
||||||
{
|
{
|
||||||
return Core::ICore::resourcePath(
|
return Core::ICore::resourcePath(
|
||||||
"qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/")
|
"qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/");
|
||||||
.toString()
|
|
||||||
+ "/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
|
QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
|
||||||
@@ -72,18 +70,15 @@ QPixmap QmlDesignerIconProvider::getPixmap(const QString &id)
|
|||||||
else if (id == "plus")
|
else if (id == "plus")
|
||||||
result = Utils::Icons::PLUS_TOOLBAR.pixmap();
|
result = Utils::Icons::PLUS_TOOLBAR.pixmap();
|
||||||
else if (id == "expression")
|
else if (id == "expression")
|
||||||
result = Icon({
|
result = Icon({{iconPath() / "expression.png", Theme::QmlDesigner_HighlightColor}}).pixmap();
|
||||||
{ iconPath() + QLatin1String("expression.png"), Theme::QmlDesigner_HighlightColor}}).pixmap();
|
|
||||||
else if (id == "placeholder")
|
else if (id == "placeholder")
|
||||||
result = Icon(iconPath() + "placeholder.png").pixmap();
|
result = Icon(iconPath() / "placeholder.png").pixmap();
|
||||||
else if (id == "submenu")
|
else if (id == "submenu")
|
||||||
result = Icon(iconPath() + "submenu.png").pixmap();
|
result = Icon(iconPath() / "submenu.png").pixmap();
|
||||||
else if (id == "up-arrow")
|
else if (id == "up-arrow")
|
||||||
result = Icon({
|
result = Icon({{iconPath() / "up-arrow.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
||||||
{ iconPath() + QLatin1String("up-arrow.png"), Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
|
||||||
else if (id == "down-arrow")
|
else if (id == "down-arrow")
|
||||||
result = Icon({
|
result = Icon({{iconPath() / "down-arrow.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
||||||
{ iconPath() + QLatin1String("down-arrow.png"), Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
|
||||||
else if (id == "checkbox-indicator")
|
else if (id == "checkbox-indicator")
|
||||||
result = Icon({
|
result = Icon({
|
||||||
{ ":/qmldesigner/images/checkbox_indicator.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
{ ":/qmldesigner/images/checkbox_indicator.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap();
|
||||||
|
Reference in New Issue
Block a user