aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2020-07-13 17:20:25 +0200
committerHenning Gründl <henning.gruendl@qt.io>2020-08-03 12:55:16 +0000
commit520c70bd8c599bc34dfba3f3542764174d2e3612 (patch)
tree2348cdd4808e7c80c806fbd7feaf3693963167aa
parentf726b0d90ba5c586425e4e8e5c08421e97997720 (diff)
QmlDesigner: Make use of mode for zoom icons
Add mode disabled to the zoom all button in FormEditor widget Task-number: QDS-2558 Change-Id: Ie0da97cca5ea4c2411e21fc3cbea202397e02097 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
index 303c79ea96..74fa9d3b73 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
@@ -147,19 +147,31 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) :
// Zoom actions
const QString fontName = "qtds_propertyIconFont.ttf";
- QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight));
+ const QColor textColorNormal(Theme::getColor(Theme::MenuItemTextColorNormal));
+ const QColor textColorDisabled(Theme::getColor(Theme::MenuBarItemTextColorDisabled));
const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
Theme::getIconUnicode(Theme::Icon::zoomAll),
- 28, 28, buttonColor);
+ 28, 28, textColorNormal);
+
+ const QString zoomSelectionUnicode = Theme::getIconUnicode(Theme::Icon::zoomSelection);
+ const auto zoomSelectionNormal = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
+ textColorNormal,
+ QSize(28, 28),
+ QIcon::Normal);
+ const auto zoomSelectionDisabeld = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
+ textColorDisabled,
+ QSize(28, 28),
+ QIcon::Disabled);
+
const QIcon zoomSelectionIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
- Theme::getIconUnicode(Theme::Icon::zoomSelection),
- 28, 28, buttonColor);
+ {zoomSelectionNormal,
+ zoomSelectionDisabeld});
const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
Theme::getIconUnicode(Theme::Icon::zoomIn),
- 28, 28, buttonColor);
+ 28, 28, textColorNormal);
const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
Theme::getIconUnicode(Theme::Icon::zoomOut),
- 28, 28, buttonColor);
+ 28, 28, textColorNormal);
m_zoomInAction = new QAction(zoomInIcon, tr("Zoom in"), this);
m_zoomInAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Plus));