forked from qt-creator/qt-creator
QmlDesigner: Fix copy/paste style buttons
Task-number: QDS-4697 Change-Id: I689fcfb2d01f4c13f34044ed06ba2babeca0066a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
9a03ce80bb
commit
397f4054c7
@@ -1007,20 +1007,32 @@ void DesignerActionManager::createDefaultDesignerActions()
|
|||||||
&selectionNotEmptyAndHasXorYProperty));
|
&selectionNotEmptyAndHasXorYProperty));
|
||||||
|
|
||||||
const QString fontName = "qtds_propertyIconFont.ttf";
|
const QString fontName = "qtds_propertyIconFont.ttf";
|
||||||
const QColor iconColorNormal(Theme::getColor(Theme::IconsBaseColor));
|
const QColor iconColorDefault(Theme::getColor(Theme::IconsBaseColor));
|
||||||
const QIcon pasteIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
const QColor iconColorDisabled(Theme::getColor(Theme::IconsDisabledColor));
|
||||||
Theme::getIconUnicode(
|
const QString copyUnicode = Theme::getIconUnicode(Theme::Icon::copyStyle);
|
||||||
Theme::Icon::pasteStyle),
|
const QString pasteUnicode = Theme::getIconUnicode(Theme::Icon::pasteStyle);
|
||||||
28,
|
|
||||||
28,
|
|
||||||
iconColorNormal);
|
|
||||||
|
|
||||||
|
const auto copyDefault = Utils::StyleHelper::IconFontHelper(copyUnicode,
|
||||||
|
iconColorDefault,
|
||||||
|
QSize(28, 28),
|
||||||
|
QIcon::Normal);
|
||||||
|
const auto copyDisabled = Utils::StyleHelper::IconFontHelper(copyUnicode,
|
||||||
|
iconColorDisabled,
|
||||||
|
QSize(28, 28),
|
||||||
|
QIcon::Disabled);
|
||||||
const QIcon copyIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
const QIcon copyIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
||||||
Theme::getIconUnicode(
|
{copyDefault, copyDisabled});
|
||||||
Theme::Icon::copyStyle),
|
|
||||||
28,
|
const auto pasteDefault = Utils::StyleHelper::IconFontHelper(pasteUnicode,
|
||||||
28,
|
iconColorDefault,
|
||||||
iconColorNormal);
|
QSize(28, 28),
|
||||||
|
QIcon::Normal);
|
||||||
|
const auto pasteDisabled = Utils::StyleHelper::IconFontHelper(pasteUnicode,
|
||||||
|
iconColorDisabled,
|
||||||
|
QSize(28, 28),
|
||||||
|
QIcon::Disabled);
|
||||||
|
const QIcon pasteIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
||||||
|
{pasteDefault, pasteDisabled});
|
||||||
|
|
||||||
addDesignerAction(new ModelNodeAction(copyFormatCommandId,
|
addDesignerAction(new ModelNodeAction(copyFormatCommandId,
|
||||||
copyFormatDisplayName,
|
copyFormatDisplayName,
|
||||||
|
Reference in New Issue
Block a user