Commit cc0e08dc authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Kickoff] Hide tab bar if only one tab button is configured

In Kickoff you can re-arrange and hide individual tab buttons.
If you remove all but one the tab bar becomes pointless.

BUG: 388521
FIXED-IN: 5.12.0

Differential Revision: https://phabricator.kde.org/D9655
parent 55eabda7
......@@ -360,6 +360,8 @@ Item {
PlasmaComponents.TabBar {
id: tabBar
property int count: 5 // updated in createButtons()
width: {
if (!visible) {
return 0;
......@@ -509,7 +511,7 @@ Item {
}
PropertyChanges {
target: tabBar
visible: true
visible: tabBar.count > 1
}
},
State {
......@@ -520,7 +522,7 @@ Item {
}
PropertyChanges {
target: tabBar
visible: true
visible: tabBar.count > 1
}
},
State {
......@@ -583,6 +585,7 @@ Item {
function createButtons() {
configMenuItems = plasmoid.configuration.menuItems;
var menuItems = getEnabled(plasmoid.configuration.menuItems);
tabBar.count = menuItems.length
// remove old menu items
for(var i = tabBar.layout.children.length -1; i >= 0; i--) {
......
Markdown is supported
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