Commit graph

9 commits

Author SHA1 Message Date
Andreas Kling
a79bac428b LibGUI+LibDraw: Add "Palette" concept for scoped color theming
GApplication now has a palette. This palette contains all the system
theme colors by default, and is inherited by a new top-level GWidget.
New child widgets inherit their parents palette.

It is possible to override the GApplication palette, and the palette
of any GWidget.

The Palette object contains a bunch of colors, each corresponding to
a ColorRole. Each role has a convenience getter as well.

Each GWidget now has a background_role() and foreground_role(), which
are then looked up in their current palette when painting. This means
that you no longer alter the background color of a widget by setting
it directly, rather you alter either its background role, or the
widget's palette.
2019-12-24 21:27:16 +01:00
Andreas Kling
b6eba388e3 LibDraw: Add Selection and SelectionText system theme colors 2019-12-24 12:13:49 +01:00
Andreas Kling
27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Andreas Kling
fd604a7c68 Applications: Run clang-format on everything. 2019-06-07 11:48:03 +02:00
Andreas Kling
b980c32662 FontEditor: Update the glyph map when changing a glyph's width. 2019-04-10 04:02:20 +02:00
Andreas Kling
4ab0cd5d4c LibGUI: Move frame painting from GFrame to StylePainter.
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
981623f4ee FontEditor: Convert the glyph map and editor widgets to be GFrames. 2019-04-10 02:43:57 +02:00
Andreas Kling
f2580dcfeb FontEditor: Remove weird focus rects and optimize repaint while drawing.
I added focus rects to these widgets because I had just started working on
focus support and I was excited but it doesn't really make sense for these
things to have focus rects. :^)

While I was here I also optimized the repaint code to only update the edited
glyph in the glyph map when editing its pixels.
2019-04-06 15:28:06 +02:00
Andreas Kling
dde224fe44 FontEditor: Break out classes into separate files. 2019-04-03 15:23:13 +02:00