diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-07-02 16:08:06 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-07-06 13:03:42 +0000 |
commit | c16de88a12c4bb715b205e55920795b81259b0fb (patch) | |
tree | 4697109a1fcaf96a7b3ed87aef880201b27a13c8 /share | |
parent | 20be1f5ddff062c6b56c5a88f3f397b2ad4c2e05 (diff) |
QmlDesigner: Remove Controls 1 dependencies
Change-Id: I085d24265669c55777e0c63b5f6fb26a8d0fe631
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share')
5 files changed, 44 insertions, 60 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow.qml index 95de97a6bbf..28851f28c40 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow.qml @@ -24,7 +24,6 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls import QtQuick.Layouts 1.0 RowLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow2.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow2.qml index 660c51dbee7..39d8159184d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow2.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRow2.qml @@ -24,7 +24,6 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls import QtQuick.Layouts 1.0 Row { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml index 697ec67adeb..6209325e7e3 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml @@ -24,17 +24,19 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls -import QtQuick.Controls.Styles 1.1 import "Constants.js" as Constants +import StudioControls 1.0 as StudioControls import QtQuickDesignerTheme 1.0 -Controls.TextField { +StudioControls.TextField { id: textField signal rejected + translationIndicator.visible: false + actionIndicator.visible: false + property bool completeOnlyTypes: false property bool completionActive: listView.count > 0 @@ -165,72 +167,57 @@ Controls.TextField { event.accepted = false } - style: TextFieldStyle { - textColor: Theme.color(Theme.PanelTextColorLight) - padding.top: 6 - padding.bottom: 2 - padding.left: 6 - placeholderTextColor: Theme.color(Theme.PanelTextColorMid) - background: Rectangle { - implicitWidth: 100 - implicitHeight: 23 - radius: 2 - color: Theme.qmlDesignerBackgroundColorDarker() - border.color: Theme.qmlDesignerBorderColor() - } - } - Row { id: buttonrow spacing: 2 - Button { + StudioControls.AbstractButton { width: 16 height: 16 - style: ButtonStyle { - background: Item{ - Image { - width: 16 - height: 16 - source: "image://icons/ok" - opacity: { - if (control.pressed) - return 0.8; - return 1.0; - } - Rectangle { - z: -1 - anchors.fill: parent - color: control.pressed || control.hovered ? Theme.qmlDesignerBackgroundColorDarker() : Theme.qmlDesignerButtonColor() - border.color: Theme.qmlDesignerBorderColor() - radius: 2 - } + + background: Item{ + Image { + width: 16 + height: 16 + source: "image://icons/ok" + opacity: { + if (control.pressed) + return 0.8; + return 1.0; + } + Rectangle { + z: -1 + anchors.fill: parent + color: control.pressed || control.hovered ? Theme.qmlDesignerBackgroundColorDarker() : Theme.qmlDesignerButtonColor() + border.color: Theme.qmlDesignerBorderColor() + radius: 2 } } + } onClicked: accepted() } - Button { + StudioControls.AbstractButton { width: 16 height: 16 - style: ButtonStyle { - background: Item { - Image { - width: 16 - height: 16 - source: "image://icons/error" - opacity: { - if (control.pressed) - return 0.8; - return 1.0; - } - Rectangle { - z: -1 - anchors.fill: parent - color: control.pressed || control.hovered ? Theme.qmlDesignerBackgroundColorDarker() : Theme.qmlDesignerButtonColor() - border.color: Theme.qmlDesignerBorderColor() - radius: 2 - } + + background: Item { + Image { + width: 16 + height: 16 + source: "image://icons/error" + opacity: { + if (control.pressed) + return 0.8; + return 1.0; } + Rectangle { + z: -1 + anchors.fill: parent + color: control.pressed || control.hovered ? Theme.qmlDesignerBackgroundColorDarker() : Theme.qmlDesignerButtonColor() + border.color: Theme.qmlDesignerBorderColor() + radius: 2 + } + } } onClicked: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml index 9306539a3b9..f61a057ae09 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml @@ -24,7 +24,7 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls +import QtQuick.Controls 2.0 as Controls import QtQuick.Layouts 1.0 Item { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/RoundedPanel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/RoundedPanel.qml index 5b9459804fd..16778b34238 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/RoundedPanel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/RoundedPanel.qml @@ -24,7 +24,6 @@ ****************************************************************************/ import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls import QtQuick.Layouts 1.0 import QtQuickDesignerTheme 1.0 |