thankyouverycool
df443863bd
LibGUI: Add set_selection() convenience helper to GlyphMapWidget
2022-03-20 20:00:25 +01:00
thankyouverycool
5c6326ae23
LibGUI: Add automatic scrolling to GlyphMapWidget
...
Similar to TextEditor, GlyphMapWidget now automatically scrolls
when dragging a selection outside its boundaries.
2022-03-20 20:00:25 +01:00
thankyouverycool
a26e71a137
LibGUI: Use system theme when painting GlyphMapWidget focus outline
2022-03-20 20:00:25 +01:00
thankyouverycool
cf13cf7225
LibGUI: Reset GlyphMapWidget only if clicking a new active glyph
...
Fixes an edge case in which mousing down on the active glyph within
a larger selection would reset the selection but fail to update the
glyph map. Now we can grow or shrink the selection by dragging the
active glyph even after an initial selection is made.
2022-03-20 20:00:25 +01:00
thankyouverycool
4f7b37de9c
LibGUI: Use nicer API for contrained positions in GlyphMapWidget
...
Forgot about this little guy. Functionally the same here, but more
robust if scrollbars change.
2022-03-20 20:00:25 +01:00
thankyouverycool
54634fc2df
LibGUI: Remove unnecessary MouseEvent calls in GlyphMapWidget
...
And pass KeyEvents directly to the relevant predecessor.
2022-03-20 20:00:25 +01:00
Maciej
a95794a356
LibGUI: Clamp selection when drag-selecting over out of range area
2022-03-17 17:05:56 +01:00
Maciej
bee9cd2113
LibGUI: Update active glyph when drag-selecting in GlyphMapWidget
...
This matches behavior of text selecting
2022-03-17 17:05:56 +01:00
Maciej
d3836f982a
LibGUI: Use different color for GlyphMapWidget background
...
This patch makes background a bit darkened so that it is possible to
distinguish out of range area from glyphs that are just not drawn.
The default background color is also changed to Window so that it looks
good in more themes.
2022-03-17 17:05:56 +01:00
Lenny Maiorani
fe3b846ac8
Libraries: Use default constructors/destructors in LibGUI
...
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-12 14:44:43 -08:00
thankyouverycool
170afc2f47
LibGUI: Allow GlyphMapWidget to filter by code point ranges
2022-02-15 10:13:19 -05:00
thankyouverycool
66e72ed5e6
LibGUI: Allow selecting glyphs by dragging in GlyphMapWidget
2022-01-16 21:36:39 +01:00
Sam Atkins
e975db23c0
LibGUI+FontEditor: Move seek-prev/next-glyph logic into GlyphMapWidget
2022-01-16 11:17:03 +01:00
Sam Atkins
ff500ffcc4
LibGUI: Add on_glyph_double_clicked() callback to GlyphMapWidget
...
This will be used by CharacterMap.
In implementing this, extracted the logic for finding which glyph is at
a given position within the widget.
2022-01-16 11:17:03 +01:00
Sam Atkins
1d79e8cb0f
LibGUI: Preserve glyph selection when changing font
2022-01-16 11:17:03 +01:00
Sam Atkins
15a7dfbc30
LibGUI: Recalculate GlyphMapWidget content size when changing font
...
Previously, if it was displaying N glyphs per line, then you changed
font to one that was a drastically different size, it would continue to
display N glyphs per line until you resized the window. Now, we
immediately recalculate how many to show, so that they fill the
available width. :^)
2022-01-16 11:17:03 +01:00
Sam Atkins
21a24c36a8
LibGUI: Make GlyphMapWidget work with vector fonts
...
This basically just meant replacing the `m_font` field with the one
inherited from Widget.
2022-01-16 11:17:03 +01:00
Sam Atkins
8175cd0a28
LibGUI+FontEditor: Move GlyphMapWidget to LibGUI
...
This will allow us to use this in other apps, such as the upcoming
Character Map. :^)
2022-01-16 11:17:03 +01:00