forked from qt-creator/qt-creator
QmlDesigner: Fix MyButton in welcomepage
Task-number: QDS-4532 Change-Id: I463aabe8e95edd7dd72c4f9ef65cf7e5fc985c67 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Templates 2.3
|
||||||
import welcome 1.0
|
import welcome 1.0
|
||||||
import StudioFonts 1.0
|
import StudioFonts 1.0
|
||||||
|
|
||||||
@@ -35,9 +35,15 @@ Button {
|
|||||||
property color defaultColor: Constants.textDefaultColor
|
property color defaultColor: Constants.textDefaultColor
|
||||||
property color checkedColor: Constants.textDefaultColor
|
property color checkedColor: Constants.textDefaultColor
|
||||||
|
|
||||||
|
text: "test"
|
||||||
|
|
||||||
|
implicitWidth: background.width
|
||||||
|
implicitHeight: background.height
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
id: textButton
|
id: textButton
|
||||||
text: button.text
|
text: button.text
|
||||||
|
|
||||||
color: checked ? button.checkedColor :
|
color: checked ? button.checkedColor :
|
||||||
button.hovered ? button.hoverColor :
|
button.hovered ? button.hoverColor :
|
||||||
button.defaultColor
|
button.defaultColor
|
||||||
@@ -47,5 +53,7 @@ Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
|
width: textButton.implicitWidth
|
||||||
|
height: textButton.implicitHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user