Commit e2c4267d authored by Fushan Wen's avatar Fushan Wen 💬 Committed by Nate Graham
Browse files

panelconfiguration: Always show button text in ToolBar

We already always show the button text, so the property makes little sense
and it depends on so many other properties, which causes the controls in
ToolBar being placed in incorrect positions.

BUG: 443294
FIXED-IN: 5.24
parent af504ec6
......@@ -125,43 +125,28 @@ Item {
anchors.margins: rowSpacing
anchors.topMargin: plasmoid.formFactor === PlasmaCore.Types.Vertical ? rowSpacing + closeButton.height : rowSpacing
property bool showText: plasmoid.formFactor === PlasmaCore.Types.Vertical || (row.x + row.width < root.width - placeHolder.width - PlasmaCore.Units.iconSizes.small*4 - PlasmaCore.Units.largeSpacing*5)
rowSpacing: PlasmaCore.Units.smallSpacing
columnSpacing: PlasmaCore.Units.smallSpacing
PlasmaComponents3.Button {
id: addWidgetsButton
text: buttonsLayout_2.showText ? root.addWidgetsButtonText : ""
text: root.addWidgetsButtonText
icon.name: "list-add"
Layout.fillWidth: true
onClicked: {
configDialog.close();
configDialog.showAddWidgetDialog();
}
Loader {
active: !buttonsLayout_2.showText
sourceComponent: PlasmaComponents3.ToolTip {
text: root.addWidgetsButtonText
}
}
}
PlasmaComponents3.Button {
id: addSpacerButton
text: buttonsLayout_2.showText ? root.addSpacerButtonText : ""
text: root.addSpacerButtonText
icon.name: "distribute-horizontal-x"
Layout.fillWidth: true
onClicked: {
configDialog.addPanelSpacer();
}
Loader {
active: !buttonsLayout_2.showText
sourceComponent: PlasmaComponents3.ToolTip {
text: root.addSpacerButtonText
}
}
}
}
......@@ -277,14 +262,12 @@ Item {
anchors.margins: rowSpacing
property bool showText: plasmoid.formFactor === PlasmaCore.Types.Vertical || (row.x + row.width < root.width - placeHolder.width - PlasmaCore.Units.iconSizes.small*4 - PlasmaCore.Units.largeSpacing*5)
rowSpacing: PlasmaCore.Units.smallSpacing
columnSpacing: PlasmaCore.Units.smallSpacing
PlasmaComponents3.Button {
id: settingsButton
text: buttonsLayout_2.showText ? root.settingsButtonText : ""
text: root.settingsButtonText
icon.name: "configure"
Layout.fillWidth: true
checkable: true
......@@ -295,12 +278,6 @@ Item {
contextMenuLoader.close()
}
}
Loader {
active: !buttonsLayout_2.showText
sourceComponent: PlasmaComponents3.ToolTip {
text: root.settingsButtonText
}
}
}
PlasmaComponents3.ToolButton {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment