Mercurial > minori
comparison rc/dark.qss @ 105:6d8da6e64d61
theme: add dark stylesheet, make it actually usable
win32: make the titlebar black where available
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 05 Nov 2023 03:54:26 -0500 |
parents | |
children | 49c8d1976869 |
comparison
equal
deleted
inserted
replaced
104:27455104ea37 | 105:6d8da6e64d61 |
---|---|
1 /* | |
2 Much of this is taken from the Breeze Style Sheets, | |
3 which is under the MIT license: | |
4 | |
5 Copyright © `<2013-2014>` `<Colin Duquesnoy>` | |
6 Copyright © `<2015-2016>` `<Alex Huszagh>` | |
7 | |
8 Permission is hereby granted, free of charge, to any person | |
9 obtaining a copy of this software and associated documentation | |
10 files (the “Software”), to deal in the Software without | |
11 restriction, including without limitation the rights to use, | |
12 copy, modify, merge, publish, distribute, sublicense, and/or sell | |
13 copies of the Software, and to permit persons to whom the | |
14 Software is furnished to do so, subject to the following | |
15 conditions: | |
16 | |
17 The above copyright notice and this permission notice shall be | |
18 included in all copies or substantial portions of the Software. | |
19 | |
20 THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, | |
21 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
22 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
23 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
24 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
25 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
26 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
27 OTHER DEALINGS IN THE SOFTWARE. | |
28 */ | |
29 | |
30 /* Colors should be the same as the QPalette in gui/theme.cc, i.e.: | |
31 window == darkgray == #353535; | |
32 ??? == gray == #808080; | |
33 base == black == #191919; | |
34 highlighted == blue = #2A82DA; | |
35 | |
36 It's a shame Qt stylesheets don't properly support variables :') | |
37 Maybe we could configure it with cmake? | |
38 */ | |
39 | |
40 AnimeListPage::pane { | |
41 margin: 0.04em; | |
42 } | |
43 | |
44 AnimeListPage::pane, | |
45 QTabWidget::pane:top { | |
46 border: 0.04em solid #808080; | |
47 top: -0.04em; | |
48 } | |
49 | |
50 AnimeListPage::pane, | |
51 QTabWidget::pane:bottom { | |
52 border: 0.04em solid #808080; | |
53 bottom: -0.04em; | |
54 } | |
55 | |
56 AnimeListPage::pane, | |
57 QTabWidget::pane:left { | |
58 border: 0.04em solid #808080; | |
59 left: -0.04em; | |
60 } | |
61 | |
62 AnimeListPage::pane, | |
63 QTabWidget::pane:right { | |
64 border: 0.04em solid #808080; | |
65 right: -0.04em; | |
66 } | |
67 | |
68 QTabBar { | |
69 qproperty-drawBase: 0; | |
70 left: 0.23em; | |
71 border-radius: 0.13em; | |
72 selection-color: transparent; | |
73 } | |
74 | |
75 QTabBar:focus { | |
76 border: 0em transparent black; | |
77 } | |
78 | |
79 QTabBar::tab:top, | |
80 QTabBar::tab:top:last, | |
81 QTabBar::tab:top:only-one { | |
82 color: white; | |
83 border: 0.04em transparent black; | |
84 border-left: 0.04em solid #808080; | |
85 border-right: 0.04em solid #808080; | |
86 border-top: 0.04em solid #808080; | |
87 background-color: #353535; | |
88 min-width: 50px; | |
89 padding-top: 0.23em; | |
90 padding-bottom: 0.23em; | |
91 padding-left: 0.46em; | |
92 padding-right: 0.46em; | |
93 border-radius: 0.09em; | |
94 border-bottom-left-radius: 0em; | |
95 border-bottom-right-radius: 0em; | |
96 } | |
97 | |
98 QTabBar::tab:top:!selected { | |
99 color: white; | |
100 background-color: #353535; | |
101 border: 0.04em solid #808080; | |
102 border-radius: 0.09em; | |
103 border-bottom-left-radius: 0em; | |
104 border-bottom-right-radius: 0em; | |
105 margin-top: 0.13em; | |
106 } | |
107 | |
108 QTabBar::tab:top:next-selected { | |
109 border-right: 0.04em transparent #353535; | |
110 border-bottom-left-radius: 0em; | |
111 border-bottom-right-radius: 0em; | |
112 } | |
113 | |
114 QTabBar::tab:top:previous-selected { | |
115 border-left: 0.04em transparent #353535; | |
116 border-bottom-left-radius: 0em; | |
117 border-bottom-right-radius: 0em; | |
118 } | |
119 | |
120 QTabBar::tab:top:!selected:hover { | |
121 background-color: rgba(42, 130, 218, 0.1); | |
122 border-radius: 0.09em; | |
123 border-bottom-left-radius: 0em; | |
124 border-bottom-right-radius: 0em; | |
125 } | |
126 | |
127 QTabBar::tab:top:!selected:first:hover { | |
128 background-color: rgba(42, 130, 218, 0.1); | |
129 border-radius: 0.09em; | |
130 border-bottom-left-radius: 0em; | |
131 border-bottom-right-radius: 0em; | |
132 } | |
133 | |
134 QGroupBox::title { | |
135 color: white; | |
136 } | |
137 | |
138 QComboBox, | |
139 QPushButton, | |
140 QDateEdit, | |
141 QSpinBox { | |
142 background-color: #353535; | |
143 color: white; | |
144 } | |
145 | |
146 /* | |
147 * QLineEdit | |
148 */ | |
149 | |
150 QLineEdit:!read-only { | |
151 background-color: #191919; | |
152 padding: 0.23em; | |
153 border-style: solid; | |
154 border: 0.04em solid #808080; | |
155 border-radius: 0.09em; | |
156 } | |
157 | |
158 Line { | |
159 background: transparent; | |
160 } | |
161 | |
162 /* QMenuBar */ | |
163 | |
164 QMenuBar { | |
165 background-color: #353535; | |
166 color: white; | |
167 } | |
168 | |
169 QMenuBar::item { | |
170 background: transparent; | |
171 } | |
172 | |
173 QMenuBar::item:selected { | |
174 background: transparent; | |
175 border: 0.04em solid #2A82DA; | |
176 } | |
177 | |
178 QMenuBar::item:disabled { | |
179 color: #808080; | |
180 } | |
181 | |
182 QMenuBar::item:pressed { | |
183 background-color: #2A82DA; | |
184 color: white; | |
185 margin-bottom: -0.09em; | |
186 padding-bottom: 0.09em; | |
187 } | |
188 | |
189 /* QMenu */ | |
190 | |
191 QMenu { | |
192 color: white; | |
193 background-color: #353535; | |
194 margin: 0.09em; | |
195 } | |
196 | |
197 QMenu::icon { | |
198 margin: 0.23em; | |
199 } | |
200 | |
201 QMenu::item { | |
202 /* Add extra padding on the right for the QMenu arrow */ | |
203 padding: 0.23em 1.5em 0.23em 1.3em; | |
204 border: 0.09em solid transparent; | |
205 background: transparent; | |
206 } | |
207 | |
208 QMenu::item:selected { | |
209 color: white; | |
210 background-color: #2A82DA; | |
211 } | |
212 | |
213 QMenu::item:selected:disabled { | |
214 background-color: #353535; | |
215 } | |
216 | |
217 QMenu::item:disabled { | |
218 color: #808080; | |
219 } | |
220 | |
221 QMenu::indicator { | |
222 width: 0.8em; | |
223 height: 0.8em; | |
224 /* To align with QMenu::icon, which has a 0.23em margin. */ | |
225 margin-left: 0.3em; | |
226 subcontrol-position: center left; | |
227 } | |
228 | |
229 /* | |
230 * QHeaderView: | |
231 * Need this for the anime list, on Windows it gets screwed up. | |
232 */ | |
233 | |
234 QHeaderView { | |
235 background-color: #353535; | |
236 border: 0.04em transparent; | |
237 border-radius: 0em; | |
238 margin: 0em; | |
239 padding: 0em; | |
240 } | |
241 | |
242 QHeaderView::section { | |
243 background-color: #353535; | |
244 border: 0.04em solid #808080; | |
245 color: #eff0f1; | |
246 border-radius: 0em; | |
247 padding: 0em 0.23em 0em 0.23em; | |
248 text-align: center; | |
249 } | |
250 | |
251 QHeaderView::section::vertical::first, | |
252 QHeaderView::section::vertical::only-one { | |
253 border-top: 0.04em solid #808080; | |
254 } | |
255 | |
256 QHeaderView::section::vertical { | |
257 border-top: transparent; | |
258 } | |
259 | |
260 QHeaderView::section::horizontal::first, | |
261 QHeaderView::section::horizontal::only-one { | |
262 border-left: 0.04em solid #808080; | |
263 } | |
264 | |
265 QHeaderView::section::horizontal { | |
266 border-left: transparent; | |
267 } | |
268 | |
269 QHeaderView[showSortIndicator="true"]::section::horizontal { | |
270 /* Same as the width of the arrow subcontrols below. */ | |
271 padding-right: 0.8em; | |
272 } | |
273 | |
274 QHeaderView::section:checked { | |
275 color: white; | |
276 background-color: #2A82DA; | |
277 } | |
278 | |
279 /* Note that this doesn't work for QTreeView unless the header is clickable */ | |
280 QHeaderView::section:hover, | |
281 QHeaderView::section::horizontal::first:hover, | |
282 QHeaderView::section::horizontal::only-one:hover, | |
283 QHeaderView::section::vertical::first:hover, | |
284 QHeaderView::section::vertical::only-one:hover { | |
285 border: 0.04em solid #2A82DA; | |
286 } |