@@ -5,52 +5,56 @@ import "Theme"
55MixxxControls .Knob {
66 id: root
77
8+ property url backgroundSource: Theme .imgKnob
89 required property color color
910 property url shadowSource: Theme .imgKnobShadow
10- property url backgroundSource: Theme .imgKnob
11+ property bool showDefaultBackground: true
12+ property bool showDefaultForeground: true
1113
12- implicitWidth: background .width
13- implicitHeight: implicitWidth
14+ angle: 116
1415 arc: true
15- arcRadius: width * 0.45
16- arcOffsetY: width * 0.01
1716 arcColor: root .color
17+ arcOffsetY: width * 0.01
18+ arcRadius: width * 0.45
1819 arcWidth: 2
19- angle: 116
20-
21- Image {
22- id: shadow
23-
24- anchors .top : parent .top
25- anchors .left : parent .left
26- anchors .right : parent .right
27- height: width * 7 / 6
28- fillMode: Image .PreserveAspectFit
29- source: root .shadowSource
30- }
20+ implicitHeight: implicitWidth
21+ implicitWidth: background .width
3122
3223 background: Image {
3324 id: background
3425
35- anchors .top : parent .top
3626 anchors .left : parent .left
3727 anchors .right : parent .right
28+ anchors .top : parent .top
3829 height: width
3930 source: root .backgroundSource
31+ visible: root .showDefaultBackground
4032 }
41-
4233 foreground: Item {
43- anchors .top : parent .top
4434 anchors .left : parent .left
4535 anchors .right : parent .right
36+ anchors .top : parent .top
4637 height: width
38+ visible: root .showDefaultForeground
4739
4840 Rectangle {
4941 anchors .horizontalCenter : parent .horizontalCenter
50- width : 2
42+ color : root . color
5143 height: root .width / 5
44+ width: 2
5245 y: height
53- color: root .color
5446 }
5547 }
48+
49+ Image {
50+ id: shadow
51+
52+ anchors .left : parent .left
53+ anchors .right : parent .right
54+ anchors .top : parent .top
55+ fillMode: Image .PreserveAspectFit
56+ height: width * 7 / 6
57+ source: root .shadowSource
58+ visible: root .showDefaultBackground
59+ }
5660}
0 commit comments