diff --git a/package/contents/ui/GroupItem.qml b/package/contents/ui/GroupItem.qml index 3b1fd5e..464f164 100644 --- a/package/contents/ui/GroupItem.qml +++ b/package/contents/ui/GroupItem.qml @@ -69,10 +69,9 @@ PlasmaComponents.ListItem { left: parent.left right: parent.right top: parent.top - topMargin: -Math.round(units.gridUnit) } - height: Math.max(units.iconSizes.medium, groupLabel.height + groupInfoLabel.height + groupBrightnessSlider.height) + Math.round(units.gridUnit / 2) + height: Math.max(units.iconSizes.medium, groupLabel.height + groupInfoLabel.height) + groupBrightnessSlider.height + Math.round(units.gridUnit / 2) HueColourItem { id: colourItem @@ -91,8 +90,7 @@ PlasmaComponents.ListItem { type: "group" anchors { - top: parent.top - topMargin: Math.round(units.iconSizes.medium / 2) + verticalCenter: groupItemBase.verticalCenter - Math.round(groupBrightnessSlider.height / 2) left: parent.left } } @@ -156,6 +154,7 @@ PlasmaComponents.ListItem { rightMargin: Math.round(units.gridUnit) right: groupOnOffButton.left top: groupInfoLabel.bottom + topMargin: units.smallSpacing * 2 } PlasmaCore.IconItem { diff --git a/package/contents/ui/LightItem.qml b/package/contents/ui/LightItem.qml index 99c50cd..37277cf 100644 --- a/package/contents/ui/LightItem.qml +++ b/package/contents/ui/LightItem.qml @@ -77,10 +77,9 @@ PlasmaComponents.ListItem { left: parent.left right: parent.right top: parent.top - topMargin: -Math.round(units.gridUnit) } - height: Math.max(units.iconSizes.medium, lightLabel.height + lightInfoLabel.height + slider.height) + Math.round(units.gridUnit / 2) + height: Math.max(units.iconSizes.medium, lightLabel.height + lightInfoLabel.height) + slider.height + Math.round(units.gridUnit / 2) HueColourItem { id: colourItem @@ -98,8 +97,7 @@ PlasmaComponents.ListItem { type: "bulb" anchors { - top: parent.top - topMargin: Math.round(units.iconSizes.medium / 2) + verticalCenter: lightItemBase.verticalCenter - Math.round(slider.height / 2) left: parent.left } } @@ -147,6 +145,7 @@ PlasmaComponents.ListItem { rightMargin: Math.round(units.gridUnit) right: lightOnOffButton.left top: lightInfoLabel.bottom + topMargin: units.smallSpacing * 2 } PlasmaCore.IconItem { @@ -222,7 +221,10 @@ PlasmaComponents.ListItem { Item { id: lightDetailsItem visible: expanded - height: Math.max((lightWhitesItem.height + units.smallSpacing * 8 + lightTabBar.height), ((theme.smallestFont.pointSize * 14) + lightTabBar.height) ) + // Explanation: there can be two items that could be the tallest in the light, depending on font size. + // For small fonts, the temperature / colour chooser will be taller, so we add it's size plus the base. + // For big font sizes, the details will be. So we add 8 lines of details plus 2 lines margin, plus the base. + height: Math.max((tempChooser.height + lightItemBase.height), ((theme.smallestFont.pointSize * 10) + lightItemBase.height) ) anchors { top: lightItemBase.bottom @@ -235,7 +237,6 @@ PlasmaComponents.ListItem { anchors { top: parent.top - topMargin: Math.round(units.gridUnit / 2) left: parent.left right: parent.right }