Widen the Quick Settings panel to fit the tab labels
This commit is contained in:
1 parent
4f2d319a35
commit
008b25147a
2 files changed
+14
-1
No files matched your search
@@ -9,9 +9,21 @@ Row {
|
||||
property string currentTab: ""
|
||||
signal tabRequested(string tabId)
|
||||
|
||||
readonly property real widestTabWidth: {
|
||||
var widest = 0
|
||||
for (var index = 0; index < tabRepeater.count; index++) {
|
||||
var tab = tabRepeater.itemAt(index)
|
||||
if (tab) widest = Math.max(widest, tab.implicitWidth)
|
||||
}
|
||||
return widest
|
||||
}
|
||||
readonly property real requiredWidth: root.widestTabWidth * root.tabs.length
|
||||
+ root.spacing * Math.max(0, root.tabs.length - 1)
|
||||
|
||||
spacing: Style.spaceReal(6)
|
||||
|
||||
Repeater {
|
||||
id: tabRepeater
|
||||
model: root.tabs
|
||||
|
||||
Button {
|
||||
|
||||
Reference in new issue
Block a user