forked from qt-creator/qt-creator
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:
committed by
Henning Gründl
parent
6135726f4a
commit
6c3be76c8d
@@ -25,6 +25,7 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuickDesignerTheme 1.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Item {
|
||||
width: grid.width
|
||||
@@ -41,10 +42,19 @@ Item {
|
||||
readonly property color selectedColor: Theme.qmlDesignerBackgroundColorDarkAlternate()
|
||||
readonly property color unselectedColor: Theme.qmlDesignerBackgroundColorDarker()
|
||||
|
||||
ExtendedFunctionButton {
|
||||
ExtendedFunctionLogic {
|
||||
id: extFuncLogic
|
||||
backendValue: originControl.backendValue
|
||||
visible: originControl.enabled
|
||||
}
|
||||
|
||||
ActionIndicator {
|
||||
anchors.left: grid.right
|
||||
anchors.leftMargin: grid.spacing
|
||||
|
||||
visible: originControl.enabled
|
||||
icon.color: extFuncLogic.color
|
||||
icon.text: extFuncLogic.glyph
|
||||
onClicked: extFuncLogic.show()
|
||||
}
|
||||
|
||||
ColorLogic {
|
||||
@@ -100,8 +110,8 @@ Item {
|
||||
Rectangle {
|
||||
property bool selected: false
|
||||
id: topLeft
|
||||
width: 15
|
||||
height: 15
|
||||
width: StudioTheme.Values.height
|
||||
height: StudioTheme.Values.height
|
||||
color: selected ? selectedColor : unselectedColor
|
||||
border.width: selected ? 2 : 1
|
||||
border.color: selected ? originControl.borderColorSelected : originControl.borderColor
|
||||
|
Reference in New Issue
Block a user