From f10adce9c8169be3d166b8a2237860711305e7a2 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 6 Aug 2019 15:12:18 +0200 Subject: QmlDesigner: Change CheckBox label position Change-Id: I491f32ff97ed540def95ea30ebdaa729b5d68c4f Reviewed-by: Thomas Hartmann --- .../imports/StudioControls/CheckBox.qml | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'share') diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml index 5ec29bbe2e..0faaf7e0a8 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml @@ -57,23 +57,9 @@ T.CheckBox { hoverEnabled: true activeFocusOnTab: false - contentItem: T.Label { - id: checkBoxLabel - leftPadding: 0 - rightPadding: 0 - verticalAlignment: Text.AlignVCenter - text: myCheckBox.text - font: myCheckBox.font - color: StudioTheme.Values.themeTextColor - visible: text !== "" - } - ActionIndicator { id: actionIndicator myControl: myCheckBox // TODO global hover issue. Can be solved with extra property in ActionIndicator - - x: checkBoxLabel.visible ? checkBoxLabel.contentWidth + myCheckBox.spacing : 0 - y: 0 width: actionIndicator.visible ? __actionIndicatorWidth : 0 height: actionIndicator.visible ? __actionIndicatorHeight : 0 } @@ -113,6 +99,17 @@ T.CheckBox { } } + contentItem: T.Label { + id: checkBoxLabel + leftPadding: checkBoxBackground.x + checkBoxBackground.width + myCheckBox.spacing + rightPadding: 0 + verticalAlignment: Text.AlignVCenter + text: myCheckBox.text + font: myCheckBox.font + color: StudioTheme.Values.themeTextColor + visible: text !== "" + } + states: [ State { name: "default" -- cgit v1.2.3