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.
This commit is contained in:
outfoxxed 2025-05-25 02:04:01 -07:00
parent 23ef14c31d
commit 428aec950e
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 7 additions and 0 deletions

View file

@ -118,6 +118,7 @@ PanelWindow {
anchors.fill: parent
color: palette.active.window
border.color: root.failed ? "#b53030" : palette.active.accent
border.width: 1
radius: 10
margin: 10

View file

@ -58,6 +58,12 @@ Rectangle {
/// See @@WrapperManager.child for details.
property alias child: manager.child
// Reading the border property implicitly sets border width to 1.
// Setting it to 0 here means the user will also have to set border.width
// even if they just want 1, but it prevents adding unexpected padding
// and works around QTBUG-137166 otherwise.
border.width: 0
MarginWrapperManager {
id: manager
extraMargin: (root.contentInsideBorder ? root.border.width : 0) + root.extraMargin