QmlDesigner: Update origin control

OriginControl replaces ExtendedFunctionButton with a combination of
ExtentendedFunctionLogic and a standalone ActionIndicator. Also changes
width and height to current style guide.

Change-Id: Idcad01505b1a61964a9a11c3b71c948c6d2a8d7b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2019-07-24 14:09:15 +02:00
committed by Henning Gründl
parent 6135726f4a
commit 6c3be76c8d

View File

@@ -25,6 +25,7 @@
import QtQuick 2.1 import QtQuick 2.1
import QtQuickDesignerTheme 1.0 import QtQuickDesignerTheme 1.0
import StudioTheme 1.0 as StudioTheme
Item { Item {
width: grid.width width: grid.width
@@ -41,10 +42,19 @@ Item {
readonly property color selectedColor: Theme.qmlDesignerBackgroundColorDarkAlternate() readonly property color selectedColor: Theme.qmlDesignerBackgroundColorDarkAlternate()
readonly property color unselectedColor: Theme.qmlDesignerBackgroundColorDarker() readonly property color unselectedColor: Theme.qmlDesignerBackgroundColorDarker()
ExtendedFunctionButton { ExtendedFunctionLogic {
id: extFuncLogic
backendValue: originControl.backendValue backendValue: originControl.backendValue
visible: originControl.enabled }
ActionIndicator {
anchors.left: grid.right anchors.left: grid.right
anchors.leftMargin: grid.spacing
visible: originControl.enabled
icon.color: extFuncLogic.color
icon.text: extFuncLogic.glyph
onClicked: extFuncLogic.show()
} }
ColorLogic { ColorLogic {
@@ -100,8 +110,8 @@ Item {
Rectangle { Rectangle {
property bool selected: false property bool selected: false
id: topLeft id: topLeft
width: 15 width: StudioTheme.Values.height
height: 15 height: StudioTheme.Values.height
color: selected ? selectedColor : unselectedColor color: selected ? selectedColor : unselectedColor
border.width: selected ? 2 : 1 border.width: selected ? 2 : 1
border.color: selected ? originControl.borderColorSelected : originControl.borderColor border.color: selected ? originControl.borderColorSelected : originControl.borderColor