aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/studiowelcome/qml
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2021-06-11 14:55:43 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2021-06-11 12:56:57 +0000
commit6e295e032f13bd9be61310e39fff41269c1572e3 (patch)
treebbc7bf1c4778dd10453d67c8b5b44b61e1ac6d2b /src/plugins/studiowelcome/qml
parentc3abdd56b70cd73fe4778e21caa536f8ff29d082 (diff)
QmlDesigner: Fix MyButton in welcomepage
Task-number: QDS-4532 Change-Id: I463aabe8e95edd7dd72c4f9ef65cf7e5fc985c67 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome/qml')
-rw-r--r--src/plugins/studiowelcome/qml/welcomepage/MyButton.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/studiowelcome/qml/welcomepage/MyButton.qml b/src/plugins/studiowelcome/qml/welcomepage/MyButton.qml
index 304adc31c3..a73191350e 100644
--- a/src/plugins/studiowelcome/qml/welcomepage/MyButton.qml
+++ b/src/plugins/studiowelcome/qml/welcomepage/MyButton.qml
@@ -24,7 +24,7 @@
****************************************************************************/
import QtQuick 2.9
-import QtQuick.Controls 2.3
+import QtQuick.Templates 2.3
import welcome 1.0
import StudioFonts 1.0
@@ -35,9 +35,15 @@ Button {
property color defaultColor: Constants.textDefaultColor
property color checkedColor: Constants.textDefaultColor
+ text: "test"
+
+ implicitWidth: background.width
+ implicitHeight: background.height
+
contentItem: Text {
id: textButton
text: button.text
+
color: checked ? button.checkedColor :
button.hovered ? button.hoverColor :
button.defaultColor
@@ -47,5 +53,7 @@ Button {
}
background: Item {
+ width: textButton.implicitWidth
+ height: textButton.implicitHeight
}
}