18 : m_activeTextColor(defaultActiveTextColor())
19 , m_activeFocusedTextColor(defaultActiveFocusedTextColor())
20 , m_activeUnfocusedTextColor(defaultActiveUnfocusedTextColor())
21 , m_inactiveTextColor(defaultInactiveTextColor())
22 , m_inactiveFocusedTextColor(defaultInactiveFocusedTextColor())
23 , m_inactiveUnfocusedTextColor(defaultInactiveUnfocusedTextColor())
24 , m_activeTextShadowColor(defaultActiveTextShadowColor())
25 , m_inactiveTextShadowColor(defaultInactiveTextShadowColor())
26 , m_textShadowOffsetX(defaultTextShadowOffsetX())
27 , m_textShadowOffsetY(defaultTextShadowOffsetY())
28 , m_useTextShadow(defaultUseTextShadow())
29 , m_haloActive(defaultHaloActive())
30 , m_haloInactive(defaultHaloInactive())
31 , m_alignment(defaultAlignment())
32 , m_verticalAlignment(defaultVerticalAlignment())
34 , m_borderLeft(defaultBorderLeft())
35 , m_borderRight(defaultBorderRight())
36 , m_borderBottom(defaultBorderBottom())
37 , m_borderTop(defaultBorderTop())
39 , m_titleEdgeTop(defaultTitleEdgeTop())
40 , m_titleEdgeBottom(defaultTitleEdgeBottom())
41 , m_titleEdgeLeft(defaultTitleEdgeLeft())
42 , m_titleEdgeRight(defaultTitleEdgeRight())
43 , m_titleEdgeTopMaximized(defaultTitleEdgeTopMaximized())
44 , m_titleEdgeBottomMaximized(defaultTitleEdgeBottomMaximized())
45 , m_titleEdgeLeftMaximized(defaultTitleEdgeLeftMaximized())
46 , m_titleEdgeRightMaximized(defaultTitleEdgeRightMaximized())
47 , m_titleBorderLeft(defaultTitleBorderLeft())
48 , m_titleBorderRight(defaultTitleBorderRight())
49 , m_titleHeight(defaultTitleHeight())
51 , m_buttonWidth(defaultButtonWidth())
52 , m_buttonWidthMinimize(defaultButtonWidthMinimize())
53 , m_buttonWidthMaximizeRestore(defaultButtonWidthMaximizeRestore())
54 , m_buttonWidthClose(defaultButtonWidthClose())
55 , m_buttonWidthAllDesktops(defaultButtonWidthAllDesktops())
56 , m_buttonWidthKeepAbove(defaultButtonWidthKeepAbove())
57 , m_buttonWidthKeepBelow(defaultButtonWidthKeepBelow())
58 , m_buttonWidthShade(defaultButtonWidthShade())
59 , m_buttonWidthHelp(defaultButtonWidthHelp())
60 , m_buttonWidthMenu(defaultButtonWidthMenu())
61 , m_buttonWidthAppMenu(defaultButtonWidthAppMenu())
62 , m_buttonHeight(defaultButtonHeight())
63 , m_buttonSpacing(defaultButtonSpacing())
64 , m_buttonMarginTop(defaultButtonMarginTop())
65 , m_explicitButtonSpacer(defaultExplicitButtonSpacer())
67 , m_paddingLeft(defaultPaddingLeft())
68 , m_paddingRight(defaultPaddingRight())
69 , m_paddingTop(defaultPaddingTop())
70 , m_paddingBottom(defaultPaddingBottom())
71 , m_animationTime(defaultAnimationTime())
72 , m_shadow(defaultShadow())
73 , m_decorationPosition(defaultDecorationPosition())
79 KConfigGroup general(&conf, QStringLiteral(
"General"));
82 m_activeFocusedTextColor = general.readEntry(
"ActiveFocusedTabColor", m_activeTextColor);
83 m_activeUnfocusedTextColor = general.readEntry(
"ActiveUnfocusedTabColor", m_inactiveTextColor);
84 m_inactiveFocusedTextColor = general.readEntry(
"InactiveFocusedTabColor", m_inactiveTextColor);
85 m_inactiveUnfocusedTextColor = general.readEntry(
"InactiveUnfocusedTabColor", m_inactiveTextColor);
93 QString
alignment = (general.readEntry(
"TitleAlignment",
"Left")).toLower();
94 if (
alignment == QStringLiteral(
"left")) {
95 m_alignment = Qt::AlignLeft;
96 }
else if (
alignment == QStringLiteral(
"center")) {
97 m_alignment = Qt::AlignHCenter;
99 m_alignment = Qt::AlignRight;
101 alignment = (general.readEntry(
"TitleVerticalAlignment",
"Center")).toLower();
102 if (
alignment == QStringLiteral(
"top")) {
103 m_verticalAlignment = Qt::AlignTop;
104 }
else if (
alignment == QStringLiteral(
"center")) {
105 m_verticalAlignment = Qt::AlignVCenter;
107 m_verticalAlignment = Qt::AlignBottom;
113 qreal scaleFactor = 1;
114 QScreen *primary = QGuiApplication::primaryScreen();
116 const qreal dpi = primary->logicalDotsPerInchX();
117 scaleFactor = dpi / 96.0f;
120 KConfigGroup border(&conf, QStringLiteral(
"Layout"));
122 m_borderLeft = qRound(scaleFactor * border.readEntry(
"BorderLeft",
defaultBorderLeft()));
123 m_borderRight = qRound(scaleFactor * border.readEntry(
"BorderRight",
defaultBorderRight()));
124 m_borderBottom = qRound(scaleFactor * border.readEntry(
"BorderBottom",
defaultBorderBottom()));
125 m_borderTop = qRound(scaleFactor * border.readEntry(
"BorderTop",
defaultBorderTop()));
127 m_titleEdgeTop = qRound(scaleFactor * border.readEntry(
"TitleEdgeTop",
defaultTitleEdgeTop()));
129 m_titleEdgeLeft = qRound(scaleFactor * border.readEntry(
"TitleEdgeLeft",
defaultTitleEdgeLeft()));
130 m_titleEdgeRight = qRound(scaleFactor * border.readEntry(
"TitleEdgeRight",
defaultTitleEdgeRight()));
137 m_titleHeight = qRound(scaleFactor * border.readEntry(
"TitleHeight",
defaultTitleHeight()));
140 m_buttonWidthMinimize = qRound(scaleFactor * border.readEntry(
"ButtonWidthMinimize", m_buttonWidth));
141 m_buttonWidthMaximizeRestore = qRound(scaleFactor * border.readEntry(
"ButtonWidthMaximizeRestore", m_buttonWidth));
142 m_buttonWidthClose = qRound(scaleFactor * border.readEntry(
"ButtonWidthClose", m_buttonWidth));
143 m_buttonWidthAllDesktops = qRound(scaleFactor * border.readEntry(
"ButtonWidthAlldesktops", m_buttonWidth));
144 m_buttonWidthKeepAbove = qRound(scaleFactor * border.readEntry(
"ButtonWidthKeepabove", m_buttonWidth));
145 m_buttonWidthKeepBelow = qRound(scaleFactor * border.readEntry(
"ButtonWidthKeepbelow", m_buttonWidth));
146 m_buttonWidthShade = qRound(scaleFactor * border.readEntry(
"ButtonWidthShade", m_buttonWidth));
147 m_buttonWidthHelp = qRound(scaleFactor * border.readEntry(
"ButtonWidthHelp", m_buttonWidth));
148 m_buttonWidthMenu = qRound(scaleFactor * border.readEntry(
"ButtonWidthMenu", m_buttonWidth));
149 m_buttonWidthAppMenu = qRound(scaleFactor * border.readEntry(
"ButtonWidthAppMenu", m_buttonWidthMenu));
150 m_buttonWidth = qRound(m_buttonWidth * scaleFactor);
151 m_buttonHeight = qRound(scaleFactor * border.readEntry(
"ButtonHeight",
defaultButtonHeight()));
152 m_buttonSpacing = qRound(scaleFactor * border.readEntry(
"ButtonSpacing",
defaultButtonSpacing()));
156 m_paddingLeft = qRound(scaleFactor * border.readEntry(
"PaddingLeft",
defaultPaddingLeft()));
157 m_paddingRight = qRound(scaleFactor * border.readEntry(
"PaddingRight",
defaultPaddingRight()));
158 m_paddingTop = qRound(scaleFactor * border.readEntry(
"PaddingTop",
defaultPaddingTop()));
159 m_paddingBottom = qRound(scaleFactor * border.readEntry(
"PaddingBottom",
defaultPaddingBottom()));