Debian Codegraph @

src/gtk4/widgets/_spinbutton.scss

raw
1 @charset "UTF-8";
2
3 /*****************
4 * GtkSpinButton *
5 *****************/
6 spinbutton {
7 text {
8 @extend %entry;
9
10 border-radius: 0px;
11 }
12
13 &:not(.vertical) {
14 // in this horizontal configuration, the whole spinbutton
15 // behaves as the entry, so we extend the entry styling
16 // and nuke the style on the internal entry
17 @extend %entry;
18
19 padding: 0;
20
21 text {
22 min-width: 28px;
23 // reset all the other props since the spinbutton node is styled here
24 margin: 0;
25 background: none;
26 background-color: transparent;
27 border: none;
28 border-radius: 0;
29 box-shadow: none;
30
31 &:backdrop:disabled {
32 background-color: transparent;
33 }
34 }
35
36 button {
37 @include neobutton(toolbutton);
38
39 &:hover {
40 color: gtk("@theme_view_hover_decoration_color");
41
42 // disable button's hover background override
43 &:not(:checked):not(:active) {
44 background: none;
45 }
46 }
47 }
48 }
49
50 // Vertical
51 &.vertical {
52 // in the vertical configuration, we treat the spinbutton
53 // as a box, and tweak the style of the entry in the middle
54 // so that it's linked
55
56 // FIXME: this should not be set at all, but otherwise it gets the wrong
57 // color
58 &:disabled {
59 color: gtk("@insensitive_base_fg_color");
60 }
61
62 &:backdrop:disabled {
63 color: gtk("@theme_unfocused_view_text_color");
64 }
65
66 &:drop(active) {
67 border-color: transparent;
68 box-shadow: none;
69 }
70
71 entry {
72 margin: 0px;
73 min-height: 26px;
74 min-width: 26px;
75 border-style: none solid none solid;
76 border-color: gtk("@borders");
77 padding: 0;
78 border-radius: 0;
79 &:disabled {
80 color: gtk("@insensitive_base_fg_color");
81 background-color: gtk("@insensitive_base_color");
82 border-color: gtk("@insensitive_borders");
83 }
84 &:backdrop:disabled {
85 color: gtk("@theme_unfocused_view_text_color");
86 background-color: gtk(
87 "@theme_unfocused_view_bg_color"
88 );
89 border-color: gtk("@unfocused_insensitive_borders");
90 }
91 }
92
93 button {
94 &:hover {
95 color: gtk("@theme_view_hover_decoration_color");
96
97 // disable button's hover background override
98 &:not(:checked):not(:active) {
99 background: none;
100 }
101 }
102 }
103
104 button.up {
105 border-radius: 3px 3px 0 0;
106 border-style: solid solid none solid;
107 }
108
109 button.down {
110 border-radius: 0 0 3px 3px;
111 border-style: none solid solid solid;
112 }
113 }
114
115 // Misc
116 treeview &:not(.vertical) {
117 min-height: 0;
118 border-style: none;
119 border-radius: 0;
120
121 entry {
122 min-height: 0;
123 padding: 1px 2px;
124 }
125 }
126 }