forked from quickshell/quickshell
		
	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:
		
							parent
							
								
									23ef14c31d
								
							
						
					
					
						commit
						428aec950e
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -118,6 +118,7 @@ PanelWindow {
 | 
				
			||||||
		anchors.fill: parent
 | 
							anchors.fill: parent
 | 
				
			||||||
		color: palette.active.window
 | 
							color: palette.active.window
 | 
				
			||||||
		border.color: root.failed ? "#b53030" : palette.active.accent
 | 
							border.color: root.failed ? "#b53030" : palette.active.accent
 | 
				
			||||||
 | 
							border.width: 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		radius: 10
 | 
							radius: 10
 | 
				
			||||||
		margin: 10
 | 
							margin: 10
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,6 +58,12 @@ Rectangle {
 | 
				
			||||||
	/// See @@WrapperManager.child for details.
 | 
						/// See @@WrapperManager.child for details.
 | 
				
			||||||
	property alias child: manager.child
 | 
						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 {
 | 
						MarginWrapperManager {
 | 
				
			||||||
		id: manager
 | 
							id: manager
 | 
				
			||||||
		extraMargin: (root.contentInsideBorder ? root.border.width : 0) + root.extraMargin
 | 
							extraMargin: (root.contentInsideBorder ? root.border.width : 0) + root.extraMargin
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue