diff --git a/shell/Ui/WidgetButton.qml b/shell/Ui/WidgetButton.qml index c9c51518c9ea..7f1a8d1f006c 100644 --- a/shell/Ui/WidgetButton.qml +++ b/shell/Ui/WidgetButton.qml @@ -17,6 +17,7 @@ Item { property real fixedWidth: -1 property real fixedHeight: -1 property real textRotation: 0 + property real labelVerticalOffset: 0 property bool keepSpace: false property bool dimmed: false property bool concealed: false @@ -122,9 +123,9 @@ Item { // Centering the line box puts the figures above the bar's middle, since // the box keeps room for descenders. Center the figure height instead, so // labels line up with the icons beside them. - anchors.verticalCenterOffset: !root.centerFigures || root.vertical || root.text.indexOf("\n") !== -1 + anchors.verticalCenterOffset: root.labelVerticalOffset + (!root.centerFigures || root.vertical || root.text.indexOf("\n") !== -1 ? 0 - : (labelMetrics.descent - labelMetrics.ascent + labelMetrics.tightBoundingRect("0").height) / 2 + : (labelMetrics.descent - labelMetrics.ascent + labelMetrics.tightBoundingRect("0").height) / 2) text: root.text color: root.active && root.useActiveColor ? root.activeColor : root.foreground font.family: root.fontFamily diff --git a/shell/plugins/bar/widgets/KeyboardLayout.qml b/shell/plugins/bar/widgets/KeyboardLayout.qml index 48f3c6511438..ced1ceff0d3e 100644 --- a/shell/plugins/bar/widgets/KeyboardLayout.qml +++ b/shell/plugins/bar/widgets/KeyboardLayout.qml @@ -261,6 +261,9 @@ BarWidget { bar: root.bar text: root.inputLabel fontSize: Style.font.caption + // Native-rendered caption glyphs sit one visual pixel above the bar's + // centre at the stock 10px caption; scale that with the caption, not the theme's spacing. + labelVerticalOffset: root.vertical ? 0 : Math.max(1, Math.round(Style.font.caption / 10)) horizontalMargin: 6 tooltipText: KeyboardLayoutModel.inputTooltip(root.inputState, root.layoutFull, root.multipleLayouts) onPressed: function(button) { diff --git a/shell/plugins/panels/network/Panel.qml b/shell/plugins/panels/network/Panel.qml index fc9ff58b77d6..d34a1947e007 100644 --- a/shell/plugins/panels/network/Panel.qml +++ b/shell/plugins/panels/network/Panel.qml @@ -1652,7 +1652,10 @@ Panel { boundsBehavior: Flickable.StopAtBounds interactive: contentHeight > height - ScrollBar.vertical: ScrollBar { policy: ScrollBar.AsNeeded } + ScrollBar.vertical: ScrollBar { + id: networkScrollBar + policy: ScrollBar.AsNeeded + } model: root.wifiStationAvailable ? root.wifiNetworks : [] currentIndex: root.selectedIndex @@ -1670,7 +1673,10 @@ Panel { Column { id: delegateColumn - width: parent.width + // Clear the scrollbar only while the list scrolls; anchoring left keeps the gap + // on the scrollbar's side when right-to-left languages mirror the panel. + anchors.left: parent.left + width: parent.width - (networkList.interactive ? networkScrollBar.width : 0) spacing: Style.space(4) PanelSectionHeader {