forked from qt-creator/qt-creator
QmlDesigner: Apply style to states view
Change-Id: I78d1d2fc6f2be2813b0e1f25b73a9ee1e80f5c16 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -40,7 +40,7 @@ Rectangle {
|
||||
|
||||
property bool isLandscape: true
|
||||
|
||||
color: StudioTheme.Values.themeStatePanelBackground
|
||||
color: StudioTheme.Values.themePanelBackground
|
||||
|
||||
onWidthChanged: root.responsiveResize(root.width, root.height)
|
||||
onHeightChanged: root.responsiveResize(root.width, root.height)
|
||||
@@ -374,7 +374,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
color: StudioTheme.Values.themeSectionHeadBackground
|
||||
color: StudioTheme.Values.themeToolbarBackground
|
||||
width: root.width
|
||||
height: (toolBar.doubleRow ? 2 : 1) * StudioTheme.Values.toolbarHeight
|
||||
|
||||
@@ -403,6 +403,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
StudioControls.ComboBox {
|
||||
style: StudioTheme.Values.viewBarControlStyle
|
||||
id: stateGroupComboBox
|
||||
actionIndicatorVisible: false
|
||||
model: statesEditorModel.stateGroups
|
||||
@@ -458,14 +459,16 @@ Rectangle {
|
||||
leftPadding: toolBar.doubleRow ? root.padding : 0
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
buttonIcon: StudioTheme.Constants.plus
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.add_medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
tooltip: qsTr("Create State Group")
|
||||
onClicked: statesEditorModel.addStateGroup("stateGroup")
|
||||
}
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
buttonIcon: StudioTheme.Constants.minus
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.remove_medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
enabled: statesEditorModel.activeStateGroupIndex !== 0
|
||||
tooltip: qsTr("Remove State Group")
|
||||
@@ -474,7 +477,8 @@ Rectangle {
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
id: editButton
|
||||
buttonIcon: StudioTheme.Constants.edit
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.edit_medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
enabled: statesEditorModel.activeStateGroupIndex !== 0
|
||||
checked: editDialog.visible
|
||||
@@ -502,7 +506,8 @@ Rectangle {
|
||||
rightPadding: root.padding
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
buttonIcon: StudioTheme.Constants.gridView
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.grid_medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
enabled: !root.tinyMode
|
||||
tooltip: qsTr("Show thumbnails")
|
||||
@@ -513,7 +518,8 @@ Rectangle {
|
||||
}
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
buttonIcon: StudioTheme.Constants.textFullJustification
|
||||
style: StudioTheme.Values.viewBarButtonStyle
|
||||
buttonIcon: StudioTheme.Constants.list_medium
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
enabled: !root.tinyMode
|
||||
tooltip: qsTr("Show property changes")
|
||||
|
||||
@@ -52,25 +52,15 @@ Item {
|
||||
|
||||
property color iconColor: StudioTheme.Values.themeTextColor
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
width: 19
|
||||
height: 3
|
||||
color: menuIcon.iconColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: 19
|
||||
height: 3
|
||||
color: menuIcon.iconColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle2
|
||||
width: 19
|
||||
height: 3
|
||||
color: menuIcon.iconColor
|
||||
Label {
|
||||
id: moreMenu
|
||||
anchors.fill: parent
|
||||
text: StudioTheme.Constants.more_medium
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
font.family: StudioTheme.Constants.iconFont.family
|
||||
font.pixelSize: 16 //StudioTheme.Values.myIconFontSize
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +113,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: background
|
||||
color: StudioTheme.Values.themeControlBackgroundHover
|
||||
color: StudioTheme.Values.themeControlBackground_topToolbarHover
|
||||
}
|
||||
PropertyChanges {
|
||||
target: menuIcon
|
||||
|
||||
@@ -127,7 +127,8 @@ Item {
|
||||
id: stateBackground
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
border.color: StudioTheme.Values.themeInteraction
|
||||
border.width: root.isChecked ? 4 : 0
|
||||
border.width: root.isChecked ? 3 : 0
|
||||
radius: 10
|
||||
anchors.fill: parent
|
||||
|
||||
readonly property int controlHeight: 25
|
||||
@@ -159,6 +160,7 @@ Item {
|
||||
|
||||
HelperWidgets.AbstractButton {
|
||||
id: defaultButton
|
||||
style: StudioTheme.Values.statesControlStyle
|
||||
width: 50
|
||||
height: stateBackground.controlHeight
|
||||
checkedInverted: true
|
||||
@@ -173,6 +175,7 @@ Item {
|
||||
|
||||
StudioControls.TextField {
|
||||
id: stateNameField
|
||||
style: StudioTheme.Values.statesControlStyle
|
||||
|
||||
property string previousText
|
||||
|
||||
@@ -648,6 +651,7 @@ Item {
|
||||
|
||||
StudioControls.TextField {
|
||||
id: whenCondition
|
||||
style: StudioTheme.Values.statesControlStyle
|
||||
|
||||
property string previousCondition
|
||||
|
||||
@@ -656,7 +660,7 @@ Item {
|
||||
|
||||
visible: !root.baseState
|
||||
indicatorVisible: true
|
||||
indicator.icon.text: StudioTheme.Constants.edit
|
||||
indicator.icon.text: StudioTheme.Constants.edit_medium
|
||||
indicator.onClicked: {
|
||||
whenCondition.previousCondition = whenCondition.text
|
||||
|
||||
@@ -755,7 +759,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: stateBackground
|
||||
color: StudioTheme.Values.themeControlBackground
|
||||
color: StudioTheme.Values.themeToolbarBackground
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -764,7 +768,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: stateBackground
|
||||
color: StudioTheme.Values.themeControlBackgroundHover
|
||||
color: StudioTheme.Values.themeStateBackgroundColor_hover
|
||||
}
|
||||
},
|
||||
State {
|
||||
@@ -774,7 +778,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: stateBackground
|
||||
color: StudioTheme.Values.themeStateHighlight
|
||||
color: StudioTheme.Values.themeThumbnailBackground_baseState
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
||||
Reference in New Issue
Block a user