@@ -13,20 +13,20 @@ Item {
13
13
// / If content should be displayed underneath the border.
14
14
// /
15
15
// / Defaults to false, does nothing if the border is opaque.
16
- property bool contentUnderBorder: false ;
16
+ property bool contentUnderBorder: false
17
17
// / If the content item should be resized to fit inside the border.
18
18
// /
19
19
// / Defaults to `!contentUnderBorder`. Most useful when combined with
20
20
// / `anchors.fill: parent` on an item passed to the ClippingRectangle.
21
- property bool contentInsideBorder: ! root .contentUnderBorder ;
21
+ property bool contentInsideBorder: ! root .contentUnderBorder
22
22
// / If the rectangle should be antialiased.
23
23
// /
24
24
// / Defaults to true if any corner has a non-zero radius, otherwise false.
25
- property /* bool*/ alias antialiasing: rectangle .antialiasing ;
25
+ property /* bool*/ alias antialiasing: rectangle .antialiasing
26
26
// / The background color of the rectangle, which goes under its content.
27
- property /* color*/ alias color: shader .backgroundColor ;
27
+ property /* color*/ alias color: shader .backgroundColor
28
28
// / See @@QtQuick.Rectangle.border.
29
- property clippingRectangleBorder border;
29
+ property clippingRectangleBorder border
30
30
// / Radius of all corners. Defaults to 0.
31
31
property /* real*/ alias radius: rectangle .radius
32
32
// / Radius of the top left corner. Defaults to @@radius.
@@ -41,10 +41,10 @@ Item {
41
41
// / Visual children of the ClippingRectangle's @@contentItem. (`list<Item>`).
42
42
// /
43
43
// / See @@QtQuick.Item.children for details.
44
- default property alias children: contentItem .children ;
44
+ default property alias children: contentItem .children
45
45
// / The item containing the rectangle's content.
46
46
// / There is usually no reason to use this directly.
47
- readonly property alias contentItem: contentItem;
47
+ readonly property alias contentItem: contentItem
48
48
49
49
Rectangle {
50
50
id: rectangle
60
60
Item {
61
61
id: contentItemContainer
62
62
anchors .fill : root
63
- layer .enabled : true
64
- visible: false
65
63
66
64
Item {
67
65
id: contentItem
@@ -74,9 +72,13 @@ Item {
74
72
id: shader
75
73
anchors .fill : root
76
74
fragmentShader: ` qrc:/Quickshell/Widgets/shaders/cliprect${ root .contentUnderBorder ? " -ub" : " " } .frag.qsb`
77
- property Rectangle rect: rectangle;
78
- property color backgroundColor;
79
- property color borderColor: root .border .color ;
80
- property Item content: contentItemContainer;
75
+ property Rectangle rect: rectangle
76
+ property color backgroundColor
77
+ property color borderColor: root .border .color
78
+
79
+ property ShaderEffectSource content: ShaderEffectSource {
80
+ hideSource: true
81
+ sourceItem: contentItemContainer
82
+ }
81
83
}
82
84
}
0 commit comments