Skip to content

Commit 428aec9

Browse files
committed
widgets/wrapper: set WrapperRectangle border.width to 0
Works around the implicit 1px border applied to Rectangles when border is accessed, and works around QTBUG-137166.
1 parent 23ef14c commit 428aec9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/ui/ReloadPopup.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ PanelWindow {
118118
anchors.fill: parent
119119
color: palette.active.window
120120
border.color: root.failed ? "#b53030" : palette.active.accent
121+
border.width: 1
121122

122123
radius: 10
123124
margin: 10

src/widgets/WrapperRectangle.qml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Rectangle {
5858
/// See @@WrapperManager.child for details.
5959
property alias child: manager.child
6060

61+
// Reading the border property implicitly sets border width to 1.
62+
// Setting it to 0 here means the user will also have to set border.width
63+
// even if they just want 1, but it prevents adding unexpected padding
64+
// and works around QTBUG-137166 otherwise.
65+
border.width: 0
66+
6167
MarginWrapperManager {
6268
id: manager
6369
extraMargin: (root.contentInsideBorder ? root.border.width : 0) + root.extraMargin

0 commit comments

Comments
 (0)