mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +00:00
LibGUI: Programatically draw table header sorting arrows
These arrows were previously drawn using the code points U+2B06 and U+2B07. The .png files for these emoji were removed in commitbfe99eb
and added to the Katica Regular 10 font in commitcf62d08
. The emoji were not added to the bold Katica variants that are used by the table header view. The effect is that a "?" replacement character was rendered. Instead of rendering the emoji, we can draw the arrows programatically, like we do in other GUI components (e.g. the scrollbar).
This commit is contained in:
parent
e746360b9a
commit
32642394a9
4 changed files with 32 additions and 17 deletions
|
@ -41,6 +41,21 @@ public:
|
|||
|
||||
Function<void(int section)> on_resize_doubleclick;
|
||||
|
||||
static constexpr auto const sorting_arrow_offset = 3;
|
||||
static constexpr auto const sorting_arrow_width = 6;
|
||||
|
||||
static constexpr auto const ascending_arrow_coordinates = Array {
|
||||
Gfx::IntPoint { 4, 2 },
|
||||
Gfx::IntPoint { 1, 5 },
|
||||
Gfx::IntPoint { 7, 5 },
|
||||
};
|
||||
|
||||
static constexpr auto const descending_arrow_coordinates = Array {
|
||||
Gfx::IntPoint { 1, 3 },
|
||||
Gfx::IntPoint { 7, 3 },
|
||||
Gfx::IntPoint { 4, 6 },
|
||||
};
|
||||
|
||||
private:
|
||||
HeaderView(AbstractTableView&, Gfx::Orientation);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue