Commit Graph
464 Commits
Author SHA1 Message Date
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
wyatt-radkiewicz 660fcf329d GUI: Collapsed game groups are persisted
GroupedListWidget and GridWidget can save what groups they have
collapsed to the config file and reload them. "launcher.cpp" uses those
functions to persist those collapsed groups through
  - changing how the games are grouped by
  - going from list to grid mode and vice versa
  - quitting scummvm and starting it again
2023-04-12 16:07:58 +02:00
Donovan Watteau b9e7168d01 GUI: Fix -Wimplicit-fallthrough warning with GCC on OSX 2023-04-11 11:06:23 +02:00
Cameron Cawley fb2503d02e GUI: Only use a transparent colour for BMP images 2023-04-09 12:54:38 +02:00
Thierry Crozat b1fcd15cad GUI: Allow scaling dialog and widget sizes in constructors
The resize() function has the option to do the scaling, but
adding it to the construtor avoids having to then call resize().
Also this makes more explicit that by default the sizes are not
scaled. The reason for not scaling by default is because values
with get from the ThemeEngine are already scaled.
2023-03-25 11:27:02 +01:00
Walter Agazzi 4b53b4f1aa GUI: Darken thumbnails of invalid entries
Applies a dark transparent overlay to the
games that are non-startable
2023-03-20 19:26:44 +01:00
Walter Agazzi 83b2ce00d7 GUI: Display titles in alternate color if unreachable 2023-03-20 19:26:44 +01:00
Miro Kropacek faeb24f037 GRAPHICS: SVGBitmap now inherits from ManagedSurface
Since the only use case for SVGBitmap is blitting it to a
ManagedSurface, combine both into one to avoid unnecessary allocation
and blitting.
2023-03-16 19:20:50 +01:00
hax0kartik e101f5397c GUI: Limit text selection feature for RTL languages 2023-03-01 18:42:34 +01:00
hax0kartik 8dcf2ec58e GUI: Add selection rendering function to EditTextWidget
This code has been written by @sev-
TODOs:
    1. Investigate and fix characters jumping/shaking during selection.
    2. Make code compatible with RTL languages such as hebrew.
2023-03-01 18:42:34 +01:00