make the width nicer
This commit is contained in:
@@ -30,13 +30,17 @@ Rectangle {
|
||||
id: wsItem
|
||||
property var workspaceData: modelData
|
||||
|
||||
|
||||
width: {
|
||||
var cw = wsNum.width
|
||||
if (wsIconsRow.children.length > 0)
|
||||
cw += Config.spacing_fun(bar.height) + wsIconsRow.width
|
||||
Math.max(cw + Config.spacing_fun(bar.height)*2, wsNum.height + Config.spacing_fun(bar.height)*2)
|
||||
}
|
||||
width: Math.max(40, wsIconsRow.width==0 ? wsNum.width + 2*Config.spacing_fun(bar.height) : wsNum.width + wsIconsRow.width + 3*Config.spacing_fun(bar.height)+Config.spacing_fun(bar.height))
|
||||
// width: {
|
||||
// var spacing = Config.spacing_fun(bar.height)
|
||||
// var cw = wsNum.width
|
||||
// if (wsIconsRow.children.length > 0) {
|
||||
// cw += spacing + wsIconsRow.width + spacing
|
||||
// } else {
|
||||
// cw += spacing * 2
|
||||
// }
|
||||
// Math.max(cw, wsNum.height + spacing * 2)
|
||||
// }
|
||||
height: workspacesContainer.height
|
||||
|
||||
// highlight
|
||||
@@ -71,9 +75,9 @@ Rectangle {
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Config.spacing_fun(bar.height)*1.5
|
||||
anchors.leftMargin: wsIconsRow.width==0 ? (wsItem.width-wsNum.width)/2 : (wsItem.width-wsNum.width-wsIconsRow.width-Config.spacing_fun(bar.height))/2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Config.spacing_fun(parent.height)
|
||||
spacing: Config.spacing_fun(bar.height)
|
||||
|
||||
Text {
|
||||
id: wsNum
|
||||
|
||||
Reference in New Issue
Block a user