Commit Graph
473 Commits
Author SHA1 Message Date
Torbjörn Andersson a1c8db3201 JANITORIAL: Clean up some whitespace and double semicolons 2024-01-29 19:32:00 +01:00
Le Philousophe ed9ded9e83 GUI: Migrate GUI to Path class 2023-12-24 13:19:25 +01:00
Thierry Crozat ebf5979cf4 GUI: Fix resizing RichTextWidget
There were two main issues:
1. The intermediate surface on which the rich text is drawn was not
   resized when the widget was resized. This resulted in text being
   cut.
2. The Graphics::MacText does not properly handle width changes,
   Resize is not handled at all if there is a table, but even when
   there is no table it can have issues with the font.
   As a workaround it is now recreated instead of being resized.
2023-12-14 16:56:48 +01:00
Thierry Crozat 5d118c4849 GUI: Add inner margin in RichTextWidget 2023-12-14 16:56:48 +01:00
Eugene Sandulenko 743bd78fb4 GUI: Fix crash when adding a game in some circumstances 2023-12-12 01:16:39 +01:00
Eugene Sandulenko 2db0c24ce6 GUI: Implement finger scrolling in RichTextWidget 2023-11-02 22:52:55 +01:00
Eugene Sandulenko 7ff167190b GUI: Switched URL clicking in the Richtext widget to mouse up 2023-11-02 22:21:55 +01:00
Eugene Sandulenko 2b22b9c581 GUI: Further fixes to keymapper code 2023-10-28 21:01:18 +02:00
polyesterswing 611fd6cd5f GUI: FIX conflicting mappings between EditableWidget and GUI elements
EditableWidget took over keyboard events targeted towards Debugger and
List. This commit fixes it by reverting some part of the code to its
original state.

Fixes issues caused by PR #5366
2023-10-28 18:39:55 +02:00
Kurian Jojo 595a3d7724 GUI: Use Keymapper for EditableWidget 2023-10-24 19:01:12 +02:00
Eugene Sandulenko cd09742f40 GUI: Make MacWindowManager global to GUI
The current hack with the local variable led to unstable behaviour
on Android when the app is suspended. Also, it was leaking memory.
2023-09-27 11:56:06 +02:00
Eugene Sandulenko a06af86770 GUI: Fix memory leaks in RichTextWidget 2023-09-26 23:53:43 +02:00
Eugene Sandulenko 18953d5907 GUI: Remove unused variable. CID 1519082, 1519090, 1519092 2023-09-19 15:49:07 +02:00
Eugene Sandulenko afd6866a3c GUI: Speed up RichTextWidget scrolling 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 367b059040 GUI: Fix type in ScrollCOntainerWidget height calculation 2023-09-17 00:56:28 +02:00
Eugene Sandulenko c0db1957c8 GUI: Pick up theme font size in RIchTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko fd98104c9e GUI: Open URL when clicking on the links in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 3a84773936 GUI: Pass image archive from RichText to MacText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 2b35c7997f GUI: Implemented link tooltips for RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko a00ae54785 GUI: Fixed default text color in RechText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko df0fa2c709 GUI: Simplified text width calcultions in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 20a0888c8d GUI: Fix scrollbar behavior in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 75fa02a879 GUI: Implement scrolling in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko bb4792e413 GUI: MOre work on adding scrollbar to RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko daf829aeb4 GUI: Replace MacTextWindow with plain MacText in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 28b14d83fc GUI: Initial code for vertical scroll bar in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 49d9261fd5 GUI: Simulatoe better colors in RichText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko c8cc2c46f7 GUI: Use theme colors for RichText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 2b498a0ff1 GUI: Do not override GUI cursor for RichText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 5e895c6af5 GUI: Added extrapath to SearchMan before initializing WM in RichText
This lets us find macgui.dat and classicmacfonts.dat
2023-09-17 00:56:28 +02:00
Eugene Sandulenko 345706521c GUI: Fixed font setting in RichText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 5719847354 GRAPHICS: MACGUI: Pass setMarkdownText through MacTextWindow 2023-09-17 00:56:28 +02:00
Eugene Sandulenko db62679c74 GUI: Use proper font in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 76dbb66489 GUI: Added RichText to HelpDialog 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 57568e8fdf GUI: Further work on RichText widget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko f048d170e7 GUI: Added stubs for RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 6d6a7a9b3a GUI: First step to draw tabs on bottom 2023-09-17 00:56:28 +02:00
PushmePullyu 4c092c26ba GUI: GridWidget: Remove redundant scroll bar update
sortGroups(): Move the call to scrollBarRecalc() up and delete
superfluous code so the scroll bar is only updated once.
2023-09-03 21:39:01 +03:00
PushmePullyu 277de28b3e GUI: GridWidget: Update scroll bar position early in sortGroups()
Propagate changes in GridWidget::_scrollPos to
ScrollBarWidget::_currentPos before calling
ScrollBarWidget::checkBounds().

Fixes #14551
2023-09-03 21:39:01 +03:00
PushmePullyu 4867e14d60 GUI: EditableWidget: Clear selection when handling backspace/delete
Clear the selection after deleting a character.

Not doing so can result in out-of-bounds reads in
EditTextWidget::drawWidget(), where _selCaretPos and _selOffset are
used as offsets, and to a failed assertion when calling
EditableWidget::defaultKeyDownHandler():

gui/widgets/editable.cpp:566:
bool GUI::EditableWidget::setCaretPos(int):
Assertion `newPos >= 0 && newPos <= (int)_editString.size()' failed.

Fixes #14584
2023-08-22 13:23:19 +03:00
Cameron Cawley 238670f3cd GUI: Fix indentation in GroupedListWidget with monospaced fonts 2023-07-22 12:50:31 +02:00
Thierry Crozat 530a972d4c GUI: Clear the selection when calling EditableWidget::setEditString
This fixes a crash (assert) due to an invalid selection in the EditableWidget
when typing anything in the widget after setEditString was called while some
text was selected.
Here is one way to get the crash (before this commit):
1. In the launcher search box type some text.
2. Select the text or part of the text.
3. Click the clear button.
4. Type something or use the backspace/delete key.
2023-07-20 00:46:48 +01:00
Le Philousophe a9bf813e86 GUI: Make thumbnail smaller than its background
This avoids the thumbnail to be drawn over the rounded borders
2023-07-04 21:23:43 +02:00
Eugene Sandulenko 254b3022f5 DIRECTOR: Gracefully process incorrect grouped list configuration 2023-06-28 00:05:19 +02:00
Misty De Meo f208f8e00b GUI: remove unused variable 2023-06-01 14:30:50 -07:00
Cameron Cawley 7ef8da53d7 GUI: Account for the scroll bar size in ScrollContainerWidget objects 2023-05-14 22:43:57 +02:00
hax0kartik 6a4e2b2694 GUI: Disable text selection in list widget 2023-04-14 14:10:20 +02:00
hax0kartik bf0845a1d6 GUI: Modify inversion only if text selection is not disabled 2023-04-14 14:10:20 +02:00
hax0kartik 4d10720b5e GUI: Do not modify inversion directly in editable widget 2023-04-14 14:10:20 +02:00
hax0kartik 337960dc5f JANITORIAL: Remove trailing whitespaces in editable.cpp 2023-04-14 14:10:20 +02:00