Fix bar icon positioning in horizontal mode
This commit is contained in:
@@ -888,7 +888,7 @@ Item {
|
|||||||
return componentLoader.item
|
return componentLoader.item
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitWidth: activeItem && activeItem.visible ? activeItem.implicitWidth : 0
|
implicitWidth: activeItem && activeItem.visible ? (root.vertical ? root.barSize : activeItem.implicitWidth) : 0
|
||||||
implicitHeight: activeItem && activeItem.visible ? activeItem.implicitHeight : 0
|
implicitHeight: activeItem && activeItem.visible ? activeItem.implicitHeight : 0
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ BarWidget {
|
|||||||
readonly property string reportHumidity: current ? (current.humidity + "%") : ""
|
readonly property string reportHumidity: current ? (current.humidity + "%") : ""
|
||||||
|
|
||||||
visible: label !== ""
|
visible: label !== ""
|
||||||
implicitWidth: button.implicitWidth + Style.spacing.controlGap
|
implicitWidth: bar && bar.vertical ? button.implicitWidth : button.implicitWidth + Style.spacing.controlGap
|
||||||
implicitHeight: button.implicitHeight
|
implicitHeight: button.implicitHeight
|
||||||
|
|
||||||
function setting(name, fallback) {
|
function setting(name, fallback) {
|
||||||
@@ -281,8 +281,8 @@ BarWidget {
|
|||||||
|
|
||||||
WidgetButton {
|
WidgetButton {
|
||||||
id: button
|
id: button
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
x: bar && bar.vertical ? Math.round((parent.width - width) / 2) : 0
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
bar: root.bar
|
bar: root.bar
|
||||||
|
|||||||
Reference in New Issue
Block a user