use implicitWidth as label minimum width
This commit is contained in:
parent
dbbb8056f5
commit
05f4a44059
@ -57,9 +57,6 @@ QtQuickControlStyle.ButtonStyle {
|
|||||||
|
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
//control.iconSource is an url: you pass a freedesktop icon,
|
|
||||||
//and it inteprets it as an url in the local qml file filesystem path
|
|
||||||
//in order to work also with upstream controls, grossly parse the url
|
|
||||||
source: control.iconName || control.iconSource
|
source: control.iconName || control.iconSource
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Layout.minimumWidth: valid ? parent.height: 0
|
Layout.minimumWidth: valid ? parent.height: 0
|
||||||
@ -73,7 +70,7 @@ QtQuickControlStyle.ButtonStyle {
|
|||||||
|
|
||||||
PlasmaComponents.Label {
|
PlasmaComponents.Label {
|
||||||
id: label
|
id: label
|
||||||
Layout.minimumWidth: Math.min(implicitWidth, theme.mSize(theme.defaultFont).width * 10)
|
Layout.minimumWidth: implicitWidth
|
||||||
text: control.text
|
text: control.text
|
||||||
font: control.font
|
font: control.font
|
||||||
visible: control.text != ""
|
visible: control.text != ""
|
||||||
|
Loading…
Reference in New Issue
Block a user