KWin
Loading...
Searching...
No Matches
themeconfig.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7// This class encapsulates all theme config values
8// it's a separate class as it's needed by both deco and config dialog
9
10#include <QColor>
11#include <QString>
12
13class KConfig;
14
15namespace Aurorae
16{
18{
19public:
21 void load(const KConfig &conf);
23 // active window
24 QColor activeTextColor(bool useTabs = false, bool focused = true) const;
25 // inactive window
26 QColor inactiveTextColor(bool useTabs = false, bool focused = true) const;
27 QColor activeTextShadowColor() const
28 {
29 return m_activeTextShadowColor;
30 }
32 {
33 return m_inactiveTextShadowColor;
34 }
36 {
37 return m_textShadowOffsetX;
38 }
40 {
41 return m_textShadowOffsetY;
42 }
43 bool useTextShadow() const
44 {
45 return m_useTextShadow;
46 }
47 bool haloActive() const
48 {
49 return m_haloActive;
50 }
51 bool haloInactive() const
52 {
53 return m_haloInactive;
54 }
55 // Alignment
56 Qt::Alignment alignment() const
57 {
58 return m_alignment;
59 };
60 Qt::Alignment verticalAlignment() const
61 {
62 return m_verticalAlignment;
63 }
64 int animationTime() const
65 {
66 return m_animationTime;
67 }
68 // Borders
69 int borderLeft() const
70 {
71 return m_borderLeft;
72 }
73 int borderRight() const
74 {
75 return m_borderRight;
76 }
77 int borderBottom() const
78 {
79 return m_borderBottom;
80 }
81 int borderTop() const
82 {
83 return m_borderTop;
84 }
85
86 int titleEdgeTop() const
87 {
88 return m_titleEdgeTop;
89 }
90 int titleEdgeBottom() const
91 {
92 return m_titleEdgeBottom;
93 }
94 int titleEdgeLeft() const
95 {
96 return m_titleEdgeLeft;
97 }
98 int titleEdgeRight() const
99 {
100 return m_titleEdgeRight;
101 }
103 {
104 return m_titleEdgeTopMaximized;
105 }
107 {
108 return m_titleEdgeBottomMaximized;
109 }
111 {
112 return m_titleEdgeLeftMaximized;
113 }
115 {
116 return m_titleEdgeRightMaximized;
117 }
118 int titleBorderLeft() const
119 {
120 return m_titleBorderLeft;
121 }
123 {
124 return m_titleBorderRight;
125 }
126 int titleHeight() const
127 {
128 return m_titleHeight;
129 }
130
131 int buttonWidth() const
132 {
133 return m_buttonWidth;
134 }
136 {
137 return m_buttonWidthMinimize;
138 }
140 {
141 return m_buttonWidthMaximizeRestore;
142 }
144 {
145 return m_buttonWidthClose;
146 }
148 {
149 return m_buttonWidthAllDesktops;
150 }
152 {
153 return m_buttonWidthKeepAbove;
154 }
156 {
157 return m_buttonWidthKeepBelow;
158 }
160 {
161 return m_buttonWidthShade;
162 }
163 int buttonWidthHelp() const
164 {
165 return m_buttonWidthHelp;
166 }
167 int buttonWidthMenu() const
168 {
169 return m_buttonWidthMenu;
170 }
172 {
173 return m_buttonWidthAppMenu;
174 }
175 int buttonHeight() const
176 {
177 return m_buttonHeight;
178 }
179 int buttonSpacing() const
180 {
181 return m_buttonSpacing;
182 }
183 int buttonMarginTop() const
184 {
185 return m_buttonMarginTop;
186 }
188 {
189 return m_explicitButtonSpacer;
190 }
191
192 int paddingLeft() const
193 {
194 return m_paddingLeft;
195 }
196 int paddingRight() const
197 {
198 return m_paddingRight;
199 }
200 int paddingTop() const
201 {
202 return m_paddingTop;
203 }
204 int paddingBottom() const
205 {
206 return m_paddingBottom;
207 }
208
209 bool shadow() const
210 {
211 return m_shadow;
212 }
213
215 {
216 return m_decorationPosition;
217 }
218
220 {
221 return QColor(Qt::black);
222 }
224 {
225 return QColor(Qt::black);
226 }
228 {
229 return QColor(Qt::black);
230 }
232 {
233 return QColor(Qt::black);
234 }
236 {
237 return QColor(Qt::black);
238 }
240 {
241 return QColor(Qt::black);
242 }
244 {
245 return QColor(Qt::white);
246 }
248 {
249 return QColor(Qt::white);
250 }
252 {
253 return 0;
254 }
256 {
257 return 0;
258 }
260 {
261 return false;
262 }
263 static bool defaultHaloActive()
264 {
265 return false;
266 }
268 {
269 return false;
270 }
271 static Qt::Alignment defaultAlignment()
272 {
273 return Qt::AlignLeft;
274 }
275 static Qt::Alignment defaultVerticalAlignment()
276 {
277 return Qt::AlignVCenter;
278 }
279 // borders
280 static int defaultBorderLeft()
281 {
282 return 5;
283 }
285 {
286 return 5;
287 }
289 {
290 return 5;
291 }
292 static int defaultBorderTop()
293 {
294 return 0;
295 }
296 // title
298 {
299 return 5;
300 }
302 {
303 return 5;
304 }
306 {
307 return 5;
308 }
310 {
311 return 5;
312 }
314 {
315 return 0;
316 }
318 {
319 return 0;
320 }
322 {
323 return 0;
324 }
326 {
327 return 0;
328 }
330 {
331 return 5;
332 }
334 {
335 return 5;
336 }
338 {
339 return 20;
340 }
341 // buttons
343 {
344 return 20;
345 }
347 {
348 return defaultButtonWidth();
349 }
351 {
352 return defaultButtonWidth();
353 }
355 {
356 return defaultButtonWidth();
357 }
359 {
360 return defaultButtonWidth();
361 }
363 {
364 return defaultButtonWidth();
365 }
367 {
368 return defaultButtonWidth();
369 }
371 {
372 return defaultButtonWidth();
373 }
375 {
376 return defaultButtonWidth();
377 }
379 {
380 return defaultButtonWidth();
381 }
383 {
384 return defaultButtonWidthMenu();
385 }
387 {
388 return 20;
389 }
391 {
392 return 5;
393 }
395 {
396 return 0;
397 }
399 {
400 return 10;
401 }
402 // padding
404 {
405 return 0;
406 }
408 {
409 return 0;
410 }
411 static int defaultPaddingTop()
412 {
413 return 0;
414 }
416 {
417 return 0;
418 }
420 {
421 return 0;
422 }
423 static bool defaultShadow()
424 {
425 return true;
426 }
428 {
429 return 0;
430 }
431
432private:
433 QColor m_activeTextColor;
434 QColor m_activeFocusedTextColor;
435 QColor m_activeUnfocusedTextColor;
436 QColor m_inactiveTextColor;
437 QColor m_inactiveFocusedTextColor;
438 QColor m_inactiveUnfocusedTextColor;
439 QColor m_activeTextShadowColor;
440 QColor m_inactiveTextShadowColor;
441 int m_textShadowOffsetX;
442 int m_textShadowOffsetY;
443 bool m_useTextShadow;
444 bool m_haloActive;
445 bool m_haloInactive;
446 Qt::Alignment m_alignment;
447 Qt::Alignment m_verticalAlignment;
448 // borders
449 int m_borderLeft;
450 int m_borderRight;
451 int m_borderBottom;
452 int m_borderTop;
453
454 // title
455 int m_titleEdgeTop;
456 int m_titleEdgeBottom;
457 int m_titleEdgeLeft;
458 int m_titleEdgeRight;
459 int m_titleEdgeTopMaximized;
460 int m_titleEdgeBottomMaximized;
461 int m_titleEdgeLeftMaximized;
462 int m_titleEdgeRightMaximized;
463 int m_titleBorderLeft;
464 int m_titleBorderRight;
465 int m_titleHeight;
466
467 // buttons
468 int m_buttonWidth;
469 int m_buttonWidthMinimize;
470 int m_buttonWidthMaximizeRestore;
471 int m_buttonWidthClose;
472 int m_buttonWidthAllDesktops;
473 int m_buttonWidthKeepAbove;
474 int m_buttonWidthKeepBelow;
475 int m_buttonWidthShade;
476 int m_buttonWidthHelp;
477 int m_buttonWidthMenu;
478 int m_buttonWidthAppMenu;
479 int m_buttonHeight;
480 int m_buttonSpacing;
481 int m_buttonMarginTop;
482 int m_explicitButtonSpacer;
483
484 // padding
485 int m_paddingLeft;
486 int m_paddingRight;
487 int m_paddingTop;
488 int m_paddingBottom;
489
490 int m_animationTime;
491
492 bool m_shadow;
493
494 int m_decorationPosition;
495};
496
497}
static int defaultButtonWidthKeepBelow()
int titleBorderRight() const
int borderRight() const
Definition themeconfig.h:73
static int defaultPaddingTop()
static int defaultAnimationTime()
static QColor defaultInactiveUnfocusedTextColor()
static int defaultTextShadowOffsetY()
static int defaultTitleEdgeTop()
static int defaultButtonWidthMinimize()
int titleEdgeRightMaximized() const
static int defaultPaddingRight()
int buttonWidthClose() const
static QColor defaultActiveTextShadowColor()
static bool defaultShadow()
int paddingLeft() const
int paddingBottom() const
static int defaultButtonWidth()
int textShadowOffsetY() const
Definition themeconfig.h:39
static int defaultButtonWidthMaximizeRestore()
QColor activeTextColor(bool useTabs=false, bool focused=true) const
static int defaultBorderRight()
static int defaultBorderLeft()
QColor activeTextShadowColor() const
Definition themeconfig.h:27
static int defaultPaddingLeft()
static QColor defaultInactiveTextColor()
static bool defaultHaloInactive()
static int defaultButtonWidthMenu()
bool haloInactive() const
Definition themeconfig.h:51
void load(const KConfig &conf)
int animationTime() const
Definition themeconfig.h:64
static int defaultTitleEdgeTopMaximized()
int borderBottom() const
Definition themeconfig.h:77
int titleEdgeRight() const
Definition themeconfig.h:98
static int defaultButtonWidthShade()
static int defaultTitleEdgeRight()
static QColor defaultActiveTextColor()
static int defaultTitleHeight()
static int defaultExplicitButtonSpacer()
int borderTop() const
Definition themeconfig.h:81
bool useTextShadow() const
Definition themeconfig.h:43
int titleHeight() const
static bool defaultUseTextShadow()
int buttonWidthAppMenu() const
int titleEdgeBottomMaximized() const
static QColor defaultActiveFocusedTextColor()
int buttonWidthKeepAbove() const
bool haloActive() const
Definition themeconfig.h:47
int buttonWidthMenu() const
QColor inactiveTextColor(bool useTabs=false, bool focused=true) const
static int defaultButtonWidthHelp()
static int defaultButtonWidthAppMenu()
static int defaultTitleBorderRight()
static int defaultButtonMarginTop()
int buttonMarginTop() const
static int defaultBorderBottom()
static int defaultTitleBorderLeft()
static int defaultTitleEdgeBottomMaximized()
static QColor defaultInactiveFocusedTextColor()
int buttonSpacing() const
int buttonWidthHelp() const
int titleEdgeTopMaximized() const
static int defaultButtonWidthAllDesktops()
bool shadow() const
QColor inactiveTextShadowColor() const
Definition themeconfig.h:31
static int defaultButtonWidthKeepAbove()
int buttonWidthMinimize() const
static QColor defaultActiveUnfocusedTextColor()
static QColor defaultInactiveTextShadowColor()
static Qt::Alignment defaultAlignment()
int titleBorderLeft() const
Qt::Alignment alignment() const
Definition themeconfig.h:56
int buttonWidthShade() const
Qt::Alignment verticalAlignment() const
Definition themeconfig.h:60
static int defaultButtonSpacing()
int titleEdgeLeft() const
Definition themeconfig.h:94
int titleEdgeBottom() const
Definition themeconfig.h:90
int decorationPosition() const
int textShadowOffsetX() const
Definition themeconfig.h:35
int buttonHeight() const
int paddingTop() const
static int defaultTitleEdgeRightMaximized()
static Qt::Alignment defaultVerticalAlignment()
int buttonWidthMaximizeRestore() const
static bool defaultHaloActive()
int paddingRight() const
int buttonWidthAllDesktops() const
int explicitButtonSpacer() const
static int defaultButtonWidthClose()
int buttonWidthKeepBelow() const
static int defaultTitleEdgeLeft()
int titleEdgeTop() const
Definition themeconfig.h:86
static int defaultTitleEdgeBottom()
static int defaultBorderTop()
static int defaultTextShadowOffsetX()
static int defaultButtonHeight()
static int defaultTitleEdgeLeftMaximized()
int borderLeft() const
Definition themeconfig.h:69
static int defaultPaddingBottom()
static int defaultDecorationPosition()
int buttonWidth() const
int titleEdgeLeftMaximized() const