0
|
1 widget HScrollbar {
|
|
2 [hexpand hfill] new HBox {
|
|
3 shape = Rectangle;
|
|
4 style.normal = {
|
|
5 background = solid(rgba(0.26, 0.26, 0.26, 1));
|
|
6 }
|
|
7
|
|
8 new ScrollbarButton button1 {
|
|
9 arrowDir = 2;
|
|
10 }
|
|
11
|
|
12 [hexpand hfill] new HWidgetSlider slider {
|
|
13 new Graphic {
|
|
14 size = 17 17;
|
|
15 style.normal = {
|
|
16 image = grid("themes/default/img/scrollhandle.png", hline(3, 14), vline(3, 14));
|
|
17 background = solid(white);
|
|
18 border = 1 rgba(.1, .1, .1, .8);
|
|
19 }
|
|
20 }
|
|
21
|
|
22 handleSize = .2;
|
|
23 skip = false;
|
|
24 }
|
|
25
|
|
26 new ScrollbarButton button2 {
|
|
27 arrowDir = 0;
|
|
28 }
|
|
29 }
|
|
30
|
|
31 handleSize = prop(slider.handleSize);
|
|
32 position = prop(slider.position);
|
|
33 skipSize = prop(slider.skipSize);
|
|
34
|
|
35 button1 = sub(button1);
|
|
36 button2 = sub(button2);
|
|
37 slider = sub(slider);
|
|
38 }
|
|
39
|
|
40
|
|
41
|
|
42 widget VScrollbar {
|
|
43 [vexpand vfill] new VBox {
|
|
44 shape = Rectangle;
|
|
45 style.normal = {
|
|
46 background = solid(rgba(0.26, 0.26, 0.26, 1));
|
|
47 }
|
|
48
|
|
49 new ScrollbarButton button1 {
|
|
50 arrowDir = 1;
|
|
51 }
|
|
52
|
|
53 [vexpand vfill] new VWidgetSlider slider {
|
|
54 new Graphic {
|
|
55 size = 17 17;
|
|
56 style.normal = {
|
|
57 image = grid("themes/default/img/scrollhandle.png", hline(3, 14), vline(3, 14));
|
|
58 background = solid(white);
|
|
59 border = 1 rgba(.1, .1, .1, .8);
|
|
60 }
|
|
61 }
|
|
62
|
|
63 handleSize = .2;
|
|
64 skip = false;
|
|
65 }
|
|
66
|
|
67 new ScrollbarButton button2 {
|
|
68 arrowDir = 3;
|
|
69 }
|
|
70 }
|
|
71
|
|
72 handleSize = prop(slider.handleSize);
|
|
73 position = prop(slider.position);
|
|
74 skipSize = prop(slider.skipSize);
|
|
75
|
|
76 button1 = sub(button1);
|
|
77 button2 = sub(button2);
|
|
78 slider = sub(slider);
|
|
79 }
|