Changeset View
Changeset View
Standalone View
Standalone View
src/kcolorscheme.h
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | 78 | enum ColorSet { | |||
---|---|---|---|---|---|
117 | * Complementary areas. | 117 | * Complementary areas. | ||
118 | * | 118 | * | ||
119 | * Some applications want some areas to have a different color scheme. | 119 | * Some applications want some areas to have a different color scheme. | ||
120 | * Usually dark areas over a light theme. For instance the fullscreen UI | 120 | * Usually dark areas over a light theme. For instance the fullscreen UI | ||
121 | * of a picture viewer, or the logout/lock screen of the plasma workspace | 121 | * of a picture viewer, or the logout/lock screen of the plasma workspace | ||
122 | * ask for a dark color scheme even on light themes. | 122 | * ask for a dark color scheme even on light themes. | ||
123 | * @since 5.19 | 123 | * @since 5.19 | ||
124 | */ | 124 | */ | ||
125 | Complementary | 125 | Complementary, | ||
126 | /** | ||||
127 | * Number of color sets. | ||||
128 | * @since 5.65 | ||||
129 | */ | ||||
130 | NColorSets | ||||
126 | }; | 131 | }; | ||
127 | 132 | | |||
128 | /** | 133 | /** | ||
129 | * This enumeration describes the background color being selected from the | 134 | * This enumeration describes the background color being selected from the | ||
130 | * given set. | 135 | * given set. | ||
131 | * | 136 | * | ||
132 | * Background colors are suitable for drawing under text, and should never | 137 | * Background colors are suitable for drawing under text, and should never | ||
133 | * be used to draw text. In combination with one of the overloads of | 138 | * be used to draw text. In combination with one of the overloads of | ||
134 | * KColorScheme::shade, they may be used to generate colors for drawing | 139 | * KColorScheme::shade, they may be used to generate colors for drawing | ||
135 | * frames, bevels, and similar decorations. | 140 | * frames, bevels, and similar decorations. | ||
136 | */ | 141 | */ | ||
137 | enum BackgroundRole { | 142 | enum BackgroundRole { | ||
138 | /** | 143 | /** | ||
139 | * Normal background. | 144 | * Normal background. | ||
140 | */ | 145 | */ | ||
141 | NormalBackground = 0, | 146 | NormalBackground, | ||
142 | /** | 147 | /** | ||
143 | * Alternate background; for example, for use in lists. | 148 | * Alternate background; for example, for use in lists. | ||
144 | * | 149 | * | ||
145 | * This color may be the same as BackgroundNormal, especially in sets | 150 | * This color may be the same as BackgroundNormal, especially in sets | ||
146 | * other than View and Window. | 151 | * other than View and Window. | ||
147 | */ | 152 | */ | ||
148 | AlternateBackground = 1, | 153 | AlternateBackground, | ||
149 | /** | 154 | /** | ||
150 | * Third color; for example, items which are new, active, requesting | 155 | * Third color; for example, items which are new, active, requesting | ||
151 | * attention, etc. | 156 | * attention, etc. | ||
152 | * | 157 | * | ||
153 | * Alerting the user that a certain field must be filled out would be a | 158 | * Alerting the user that a certain field must be filled out would be a | ||
154 | * good usage (although NegativeBackground could be used to the same | 159 | * good usage (although NegativeBackground could be used to the same | ||
155 | * effect, depending on what you are trying to achieve). Unlike | 160 | * effect, depending on what you are trying to achieve). Unlike | ||
156 | * ActiveText, this should not be used for mouseover effects. | 161 | * ActiveText, this should not be used for mouseover effects. | ||
157 | */ | 162 | */ | ||
158 | ActiveBackground = 2, | 163 | ActiveBackground, | ||
159 | /** | 164 | /** | ||
160 | * Fourth color; corresponds to (unvisited) links. | 165 | * Fourth color; corresponds to (unvisited) links. | ||
161 | * | 166 | * | ||
162 | * Exactly what this might be used for is somewhat harder to qualify; | 167 | * Exactly what this might be used for is somewhat harder to qualify; | ||
163 | * it might be used for bookmarks, as a 'you can click here' indicator, | 168 | * it might be used for bookmarks, as a 'you can click here' indicator, | ||
164 | * or to highlight recent content (i.e. in a most-recently-accessed | 169 | * or to highlight recent content (i.e. in a most-recently-accessed | ||
165 | * list). | 170 | * list). | ||
166 | */ | 171 | */ | ||
167 | LinkBackground = 3, | 172 | LinkBackground, | ||
168 | /** | 173 | /** | ||
169 | * Fifth color; corresponds to visited links. | 174 | * Fifth color; corresponds to visited links. | ||
170 | * | 175 | * | ||
171 | * This can also be used to indicate "not recent" content, especially | 176 | * This can also be used to indicate "not recent" content, especially | ||
172 | * when a color is needed to denote content which is "old" or | 177 | * when a color is needed to denote content which is "old" or | ||
173 | * "archival". | 178 | * "archival". | ||
174 | */ | 179 | */ | ||
175 | VisitedBackground = 4, | 180 | VisitedBackground, | ||
176 | /** | 181 | /** | ||
177 | * Sixth color; for example, errors, untrusted content, etc. | 182 | * Sixth color; for example, errors, untrusted content, etc. | ||
178 | */ | 183 | */ | ||
179 | NegativeBackground = 5, | 184 | NegativeBackground, | ||
180 | /** | 185 | /** | ||
181 | * Seventh color; for example, warnings, secure/encrypted content. | 186 | * Seventh color; for example, warnings, secure/encrypted content. | ||
182 | */ | 187 | */ | ||
183 | NeutralBackground = 6, | 188 | NeutralBackground, | ||
184 | /** | 189 | /** | ||
185 | * Eigth color; for example, success messages, trusted content. | 190 | * Eigth color; for example, success messages, trusted content. | ||
186 | */ | 191 | */ | ||
187 | PositiveBackground = 7 | 192 | PositiveBackground, | ||
193 | /** | ||||
194 | * Number of background roles. | ||||
195 | * @since 5.65 | ||||
196 | */ | ||||
197 | NBackgroundRoles | ||||
188 | }; | 198 | }; | ||
189 | 199 | | |||
190 | /** | 200 | /** | ||
191 | * This enumeration describes the foreground color being selected from the | 201 | * This enumeration describes the foreground color being selected from the | ||
192 | * given set. | 202 | * given set. | ||
193 | * | 203 | * | ||
194 | * Foreground colors are suitable for drawing text or glyphs (such as the | 204 | * Foreground colors are suitable for drawing text or glyphs (such as the | ||
195 | * symbols on window decoration buttons, assuming a suitable background | 205 | * symbols on window decoration buttons, assuming a suitable background | ||
196 | * brush is used), and should never be used to draw backgrounds. | 206 | * brush is used), and should never be used to draw backgrounds. | ||
197 | * | 207 | * | ||
198 | * For window decorations, the following is suggested, but not set in | 208 | * For window decorations, the following is suggested, but not set in | ||
199 | * stone: | 209 | * stone: | ||
200 | * @li Maximize - PositiveText | 210 | * @li Maximize - PositiveText | ||
201 | * @li Minimize - NeutralText | 211 | * @li Minimize - NeutralText | ||
202 | * @li Close - NegativeText | 212 | * @li Close - NegativeText | ||
203 | * @li WhatsThis - LinkText | 213 | * @li WhatsThis - LinkText | ||
204 | * @li Sticky - ActiveText | 214 | * @li Sticky - ActiveText | ||
205 | */ | 215 | */ | ||
206 | enum ForegroundRole { | 216 | enum ForegroundRole { | ||
207 | /** | 217 | /** | ||
208 | * Normal foreground. | 218 | * Normal foreground. | ||
209 | */ | 219 | */ | ||
210 | NormalText = 0, | 220 | NormalText, | ||
211 | /** | 221 | /** | ||
212 | * Second color; for example, comments, items which are old, inactive | 222 | * Second color; for example, comments, items which are old, inactive | ||
213 | * or disabled. Generally used for things that are meant to be "less | 223 | * or disabled. Generally used for things that are meant to be "less | ||
214 | * important". InactiveText is not the same role as NormalText in the | 224 | * important". InactiveText is not the same role as NormalText in the | ||
215 | * inactive state. | 225 | * inactive state. | ||
216 | */ | 226 | */ | ||
217 | InactiveText = 1, | 227 | InactiveText, | ||
218 | /** | 228 | /** | ||
219 | * Third color; for example items which are new, active, requesting | 229 | * Third color; for example items which are new, active, requesting | ||
220 | * attention, etc. May be used as a hover color for clickable items. | 230 | * attention, etc. May be used as a hover color for clickable items. | ||
221 | */ | 231 | */ | ||
222 | ActiveText = 2, | 232 | ActiveText, | ||
223 | /** | 233 | /** | ||
224 | * Fourth color; use for (unvisited) links. May also be used for other | 234 | * Fourth color; use for (unvisited) links. May also be used for other | ||
225 | * clickable items or content that indicates relationships, items that | 235 | * clickable items or content that indicates relationships, items that | ||
226 | * indicate somewhere the user can visit, etc. | 236 | * indicate somewhere the user can visit, etc. | ||
227 | */ | 237 | */ | ||
228 | LinkText = 3, | 238 | LinkText, | ||
229 | /** | 239 | /** | ||
230 | * Fifth color; used for (visited) links. As with LinkText, may be used | 240 | * Fifth color; used for (visited) links. As with LinkText, may be used | ||
231 | * for items that have already been "visited" or accessed. May also be | 241 | * for items that have already been "visited" or accessed. May also be | ||
232 | * used to indicate "historical" (i.e. "old") items or information, | 242 | * used to indicate "historical" (i.e. "old") items or information, | ||
233 | * especially if InactiveText is being used in the same context to | 243 | * especially if InactiveText is being used in the same context to | ||
234 | * express something different. | 244 | * express something different. | ||
235 | */ | 245 | */ | ||
236 | VisitedText = 4, | 246 | VisitedText, | ||
237 | /** | 247 | /** | ||
238 | * Sixth color; for example, errors, untrusted content, deletions, | 248 | * Sixth color; for example, errors, untrusted content, deletions, | ||
239 | * etc. | 249 | * etc. | ||
240 | */ | 250 | */ | ||
241 | NegativeText = 5, | 251 | NegativeText, | ||
242 | /** | 252 | /** | ||
243 | * Seventh color; for example, warnings, secure/encrypted content. | 253 | * Seventh color; for example, warnings, secure/encrypted content. | ||
244 | */ | 254 | */ | ||
245 | NeutralText = 6, | 255 | NeutralText, | ||
246 | /** | 256 | /** | ||
247 | * Eigth color; for example, additions, success messages, trusted | 257 | * Eigth color; for example, additions, success messages, trusted | ||
248 | * content. | 258 | * content. | ||
249 | */ | 259 | */ | ||
250 | PositiveText = 7 | 260 | PositiveText, | ||
261 | /** | ||||
262 | * Number of foreground roles. | ||||
263 | * @since 5.65 | ||||
264 | */ | ||||
265 | NForegroundRoles | ||||
251 | }; | 266 | }; | ||
252 | 267 | | |||
253 | /** | 268 | /** | ||
254 | * This enumeration describes the decoration color being selected from the | 269 | * This enumeration describes the decoration color being selected from the | ||
255 | * given set. | 270 | * given set. | ||
256 | * | 271 | * | ||
257 | * Decoration colors are used to draw decorations (such as frames) for | 272 | * Decoration colors are used to draw decorations (such as frames) for | ||
258 | * special purposes. Like color shades, they are neither foreground nor | 273 | * special purposes. Like color shades, they are neither foreground nor | ||
259 | * background colors. Text should not be painted over a decoration color, | 274 | * background colors. Text should not be painted over a decoration color, | ||
260 | * and decoration colors should not be used to draw text. | 275 | * and decoration colors should not be used to draw text. | ||
261 | */ | 276 | */ | ||
262 | enum DecorationRole { | 277 | enum DecorationRole { | ||
263 | /** | 278 | /** | ||
264 | * Color used to draw decorations for items which have input focus. | 279 | * Color used to draw decorations for items which have input focus. | ||
265 | */ | 280 | */ | ||
266 | FocusColor, | 281 | FocusColor, | ||
267 | /** | 282 | /** | ||
268 | * Color used to draw decorations for items which will be activated by | 283 | * Color used to draw decorations for items which will be activated by | ||
269 | * clicking. | 284 | * clicking. | ||
270 | */ | 285 | */ | ||
271 | HoverColor | 286 | HoverColor, | ||
287 | /** | ||||
288 | * Number of decoration roles. | ||||
289 | * @since 5.65 | ||||
290 | */ | ||||
291 | NDecorationRoles | ||||
272 | }; | 292 | }; | ||
273 | 293 | | |||
274 | /** | 294 | /** | ||
275 | * This enumeration describes the color shade being selected from the given | 295 | * This enumeration describes the color shade being selected from the given | ||
276 | * set. | 296 | * set. | ||
277 | * | 297 | * | ||
278 | * Color shades are used to draw "3d" elements, such as frames and bevels. | 298 | * Color shades are used to draw "3d" elements, such as frames and bevels. | ||
279 | * They are neither foreground nor background colors. Text should not be | 299 | * They are neither foreground nor background colors. Text should not be | ||
Show All 16 Lines | 302 | enum ShadeRole { | |||
296 | /** | 316 | /** | ||
297 | * The dark color is in between mid() and shadow(). | 317 | * The dark color is in between mid() and shadow(). | ||
298 | */ | 318 | */ | ||
299 | DarkShade, | 319 | DarkShade, | ||
300 | /** | 320 | /** | ||
301 | * The shadow color is darker than light() or midlight() and contrasts | 321 | * The shadow color is darker than light() or midlight() and contrasts | ||
302 | * the base color. | 322 | * the base color. | ||
303 | */ | 323 | */ | ||
304 | ShadowShade | 324 | ShadowShade, | ||
325 | /** | ||||
326 | * Number of foreground roles. | ||||
327 | * @since 5.65 | ||||
328 | */ | ||||
329 | NShadeRoles | ||||
305 | }; | 330 | }; | ||
306 | 331 | | |||
307 | /** Construct a copy of another KColorScheme. */ | 332 | /** Construct a copy of another KColorScheme. */ | ||
308 | KColorScheme(const KColorScheme &); | 333 | KColorScheme(const KColorScheme &); | ||
309 | 334 | | |||
310 | /** Destructor */ | 335 | /** Destructor */ | ||
311 | virtual ~KColorScheme(); // TODO KF6: remove virtual | 336 | virtual ~KColorScheme(); // TODO KF6: remove virtual | ||
312 | 337 | | |||
▲ Show 20 Lines • Show All 270 Lines • Show Last 20 Lines |