forked from qt-creator/qt-creator
QmlDesigner: Use correct icons for formatting operations
Change-Id: Ic3f18361e46970a176a2494b0557665c20a87f16 Reviewed-by: Pekka Kaikkonen <pekka.kaikkonen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#include "changestyleaction.h"
|
#include "changestyleaction.h"
|
||||||
#include "designeractionmanagerview.h"
|
#include "designeractionmanagerview.h"
|
||||||
#include "modelnodecontextmenu_helper.h"
|
|
||||||
#include "formatoperation.h"
|
#include "formatoperation.h"
|
||||||
|
#include "modelnodecontextmenu_helper.h"
|
||||||
#include "qmldesignerconstants.h"
|
#include "qmldesignerconstants.h"
|
||||||
#include "rewritingexception.h"
|
#include "rewritingexception.h"
|
||||||
#include <bindingproperty.h>
|
#include <bindingproperty.h>
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
#include <nodelistproperty.h>
|
#include <nodelistproperty.h>
|
||||||
#include <nodemetainfo.h>
|
#include <nodemetainfo.h>
|
||||||
#include <nodeproperty.h>
|
#include <nodeproperty.h>
|
||||||
|
#include <theme.h>
|
||||||
|
|
||||||
#include <formeditortoolbutton.h>
|
#include <formeditortoolbutton.h>
|
||||||
|
|
||||||
@@ -46,11 +47,11 @@
|
|||||||
#include <listmodeleditor/listmodeleditordialog.h>
|
#include <listmodeleditor/listmodeleditordialog.h>
|
||||||
#include <listmodeleditor/listmodeleditormodel.h>
|
#include <listmodeleditor/listmodeleditormodel.h>
|
||||||
|
|
||||||
|
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/stylehelper.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
#include <QGraphicsLinearLayout>
|
#include <QGraphicsLinearLayout>
|
||||||
@@ -992,40 +993,55 @@ void DesignerActionManager::createDefaultDesignerActions()
|
|||||||
|
|
||||||
addDesignerAction(new SeperatorDesignerAction(editCategory, 220));
|
addDesignerAction(new SeperatorDesignerAction(editCategory, 220));
|
||||||
|
|
||||||
addDesignerAction(new ModelNodeAction(
|
addDesignerAction(
|
||||||
resetPositionCommandId,
|
new ModelNodeAction(resetPositionCommandId,
|
||||||
resetPositionDisplayName,
|
resetPositionDisplayName,
|
||||||
Utils::Icon({{":/utils/images/pan.png", Utils::Theme::IconsBaseColor},
|
Utils::Icon({{":/utils/images/pan.png", Utils::Theme::IconsBaseColor},
|
||||||
{":/utils/images/iconoverlay_reset.png", Utils::Theme::IconsStopToolBarColor}}).icon(),
|
{":/utils/images/iconoverlay_reset.png",
|
||||||
resetPositionTooltip,
|
Utils::Theme::IconsStopToolBarColor}})
|
||||||
editCategory,
|
.icon(),
|
||||||
QKeySequence("Ctrl+d"),
|
resetPositionTooltip,
|
||||||
200,
|
editCategory,
|
||||||
&resetPosition,
|
QKeySequence("Ctrl+d"),
|
||||||
&selectionNotEmptyAndHasXorYProperty));
|
200,
|
||||||
|
&resetPosition,
|
||||||
|
&selectionNotEmptyAndHasXorYProperty));
|
||||||
|
|
||||||
addDesignerAction(new ModelNodeAction(
|
const QString fontName = "qtds_propertyIconFont.ttf";
|
||||||
copyFormatCommandId,
|
const QColor iconColorNormal(Theme::getColor(Theme::IconsBaseColor));
|
||||||
copyFormatDisplayName,
|
const QIcon pasteIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
||||||
Utils::Icon({{":/qmldesigner/icon/designeractions/images/raise.png", Utils::Theme::IconsBaseColor}}).icon(),
|
Theme::getIconUnicode(
|
||||||
copyFormatTooltip,
|
Theme::Icon::pasteStyle),
|
||||||
editCategory,
|
28,
|
||||||
QKeySequence(),
|
28,
|
||||||
120,
|
iconColorNormal);
|
||||||
©Format,
|
|
||||||
&propertiesCopyable));
|
|
||||||
|
|
||||||
addDesignerAction(new ModelNodeAction(
|
const QIcon copyIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
||||||
applyFormatCommandId,
|
Theme::getIconUnicode(
|
||||||
applyFormatDisplayName,
|
Theme::Icon::copyStyle),
|
||||||
Utils::Icon({{":/qmldesigner/icon/designeractions/images/lower.png", Utils::Theme::IconsBaseColor}}).icon(),
|
28,
|
||||||
applyFormatTooltip,
|
28,
|
||||||
editCategory,
|
iconColorNormal);
|
||||||
QKeySequence(),
|
|
||||||
120,
|
|
||||||
&applyFormat,
|
|
||||||
&propertiesApplyable));
|
|
||||||
|
|
||||||
|
addDesignerAction(new ModelNodeAction(copyFormatCommandId,
|
||||||
|
copyFormatDisplayName,
|
||||||
|
copyIcon,
|
||||||
|
copyFormatTooltip,
|
||||||
|
editCategory,
|
||||||
|
QKeySequence(),
|
||||||
|
120,
|
||||||
|
©Format,
|
||||||
|
&propertiesCopyable));
|
||||||
|
|
||||||
|
addDesignerAction(new ModelNodeAction(applyFormatCommandId,
|
||||||
|
applyFormatDisplayName,
|
||||||
|
pasteIcon,
|
||||||
|
applyFormatTooltip,
|
||||||
|
editCategory,
|
||||||
|
QKeySequence(),
|
||||||
|
120,
|
||||||
|
&applyFormat,
|
||||||
|
&propertiesApplyable));
|
||||||
|
|
||||||
addDesignerAction(new ModelNodeAction(
|
addDesignerAction(new ModelNodeAction(
|
||||||
resetSizeCommandId,
|
resetSizeCommandId,
|
||||||
|
Reference in New Issue
Block a user