From 0c7fd82e2276972d541f6529c49a59f22ee52968 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 25 Aug 2017 13:56:36 +0200 Subject: [PATCH] Give icons in the top bar a different size Because one of the icons now needs to be rectangular. All icons in there have the same style so they all have to be resized. Contributes to issue CURA-4148. --- resources/themes/cura/icons/tab_settings.svg | 2 +- resources/themes/cura/styles.qml | 19 +++++++++---------- resources/themes/cura/theme.json | 1 + 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/themes/cura/icons/tab_settings.svg b/resources/themes/cura/icons/tab_settings.svg index 4cd6bd7bec..e2a4860647 100644 --- a/resources/themes/cura/icons/tab_settings.svg +++ b/resources/themes/cura/icons/tab_settings.svg @@ -1,3 +1,3 @@ - + diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 57837e185b..9b28af0dfb 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 @@ -128,35 +128,34 @@ QtObject { label: Item { - - implicitHeight: Theme.getSize("button_icon").height + implicitHeight: Theme.getSize("topbar_button_icon").height implicitWidth: Theme.getSize("topbar_button").width; Item { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter; width: childrenRect.width - height: Theme.getSize("button_icon").height + height: Theme.getSize("topbar_button_icon").height UM.RecolorImage { id: icon color: UM.Theme.getColor("text_emphasis") opacity: !control.enabled ? 0.2 : 1.0 source: control.iconSource - width: Theme.getSize("button_icon").width - height: Theme.getSize("button_icon").height + width: Theme.getSize("topbar_button_icon").width + height: Theme.getSize("topbar_button_icon").height - sourceSize: Theme.getSize("button_icon") + sourceSize: Theme.getSize("topbar_button_icon") } Image { visible: control.overlayIconSource != "" opacity: !control.enabled ? 0.2 : 1.0 source: control.overlayIconSource - width: Theme.getSize("button_icon").width - height: Theme.getSize("button_icon").height + width: Theme.getSize("topbar_button_icon").width + height: Theme.getSize("topbar_button_icon").height - sourceSize: Theme.getSize("button_icon") + sourceSize: Theme.getSize("topbar_button_icon") } Label { diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 54ef0a8788..f1436a8466 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -287,6 +287,7 @@ "button_lining": [0, 0], "topbar_button": [17, 4], + "topbar_button_icon": [3.125, 2.5], "button_tooltip": [1.0, 1.3], "button_tooltip_arrow": [0.25, 0.25],