diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-06-06 14:52:40 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-06-06 13:07:43 +0000 |
commit | 4edfa4c740fa93700f18246a20aee805030ed700 (patch) | |
tree | d2e83155222811731030333480c1822a63e26967 | |
parent | 726c51eb8cb8488fe503ac9cfe053f447d00a175 (diff) | |
download | qt-creator-4edfa4c740fa93700f18246a20aee805030ed700.tar.gz |
QmlDesigner: Use new controls for FontComboBox
Change-Id: I72946b4adb8e160c05191da0c96011881cd09543
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2 files changed, 14 insertions, 11 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml index 6cca085da7..4f085015fe 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontComboBox.qml @@ -26,14 +26,16 @@ import QtQuick 2.1 import HelperWidgets 2.0 import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.0 as Controls +import StudioControls 1.0 as StudioControls -Controls.ComboBox { +StudioControls.ComboBox { id: comboBox property variant backendValue property color textColor: colorLogic.textColor + labelColor: colorLogic.textColor + onTextColorChanged: setColor() editable: true @@ -43,10 +45,17 @@ Controls.ComboBox { editText = comboBox.backendValue.valueToString } - style: CustomComboBoxStyle { - textColor: comboBox.textColor + ExtendedFunctionLogic { + id: extFuncLogic + backendValue: comboBox.backendValue } + actionIndicator.icon.color: extFuncLogic.color + actionIndicator.icon.text: extFuncLogic.glyph + actionIndicator.onClicked: extFuncLogic.show() + + actionIndicator.visible: showExtendedFunctionButton + ColorLogic { id: colorLogic backendValue: comboBox.backendValue @@ -82,13 +91,6 @@ Controls.ComboBox { backendValue.value = indexText; } - ExtendedFunctionButton { - x: 2 - anchors.verticalCenter: parent.verticalCenter - backendValue: comboBox.backendValue - visible: comboBox.enabled - } - Connections { target: modelNodeBackend onSelectionChanged: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml index b9b75ce69e..28621e4be6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml @@ -63,6 +63,7 @@ Section { FontComboBox { backendValue: fontSection.fontFamily Layout.fillWidth: true + width: 160 } Label { |