Commit graph

4580 commits

Author SHA1 Message Date
SupSuper
1460b901a6 GUI: Fix engine icons only showing up in grid once 2022-10-04 21:07:53 +02:00
Le Philousophe
2c5c8ed486 GUI: Fix memory leak when loading DEMO icon
(cherry picked from commit 1d715c7bbb)
2022-10-01 15:43:18 +02:00
Le Philousophe
392553d9b2 GUI: Redraw editable widget and move its caret when text is set by code
(cherry picked from commit ea560b5dab)
2022-10-01 15:28:39 +02:00
Le Philousophe
7dca536b26 GUI: Avoid useless surface copy before scaling
By using the const rawSurface function instead of the surfacePtr one,
there is no need to create a copy of the const argument.

(cherry picked from commit d21b42950a)
2022-10-01 15:19:55 +02:00
Le Philousophe
c6adcbc1dc GUI: Fix memory leak when resizing grid widget
(cherry picked from commit def0624ee9)
2022-10-01 15:19:55 +02:00
Le Philousophe
6efc7edecd GUI: Do hide GridItemWidgets when nothing is to be shown
(cherry picked from commit 9af7ecdd15)
2022-10-01 15:19:55 +02:00
Eugene Sandulenko
5f05219829 GUI: Avoid dupicate icon loading 2022-10-01 00:15:22 +02:00
Walter Agazzi
2b7dee23b6 GUI: Add overlay to show demo status on thumbnails 2022-10-01 00:14:56 +02:00
Eugene Sandulenko
cf88e250ef GUI: Fix mass add crash with older ScummVM configs 2022-10-01 00:02:52 +02:00
Niv Baehr
1c9dbb111a GUI: TTS: strip GUI formatting before reading list item 2022-10-01 00:01:49 +02:00
Le Philousophe
7d7de5930b GUI: Make GridWidget accept focus
This avoids the filter text to take the focus.
In Android this prevents the launcher to start with the virtual keyboard
displayed.
In the future, the widget could also take keyboards event into account
like the ListWidget one.
2022-09-30 23:45:17 +02:00
Le Philousophe
f08089263f GUI: Move the icons per row slider value to the right
Else it's stuck to the slider widget
2022-09-30 23:45:02 +02:00
Le Philousophe
2e53d9cc5d GUI: Move buttons bar below launcher lower
Else widgets are erased when the launcher widget is redrawn
2022-09-30 23:44:28 +02:00
Le Philousophe
7294f8be1c GUI: Remove useless widget 2022-09-30 23:43:43 +02:00
Lothar Serra Mari
ca709c34e7 GUI: Fix constructing icons path for dummy data when clearing icons cache
This fixes the cache clearing issues mentioned in #13744 for Win32 and macOS.
2022-08-02 00:09:28 +02:00
Cameron Cawley
c7cc54ba64 GUI: Display the full engine name in the About dialog 2022-07-23 22:16:21 +01:00
Lothar Serra Mari
bcf0be9a3c GUI: Update translations datafile 2022-07-16 21:34:56 +02:00
Lothar Serra Mari
fc84b1663a GUI: Update translations datafile 2022-07-16 12:54:43 +02:00
Lothar Serra Mari
08f4b5197e GUI: Update translations datafile 2022-07-16 09:45:35 +02:00
Lothar Serra Mari
660e0fa921 GUI: Fix calculating size of previously downloaded icons files 2022-07-10 16:30:46 +02:00
Lothar Serra Mari
1e3ee46f80 GUI: Add option to reset icons cache for grid view 2022-07-10 16:30:41 +02:00
Eugene Sandulenko
925dc26640
CREDITS: Added icons pack credits and regenrated files 2022-07-09 21:41:40 +02:00
Eugene Sandulenko
41d9684983
GUI: Check downloaded icon file sizes. Fixes bug #13566 2022-07-09 13:56:00 +02:00
Thunderforge
27872d79a9
COMMON: Adding default iconspath functionality
It's for macOS only right now.
2022-07-02 22:37:48 +02:00
Thierry Crozat
f4bbbe5786
GUI: Improve thread-safety for icons set access
The previous commit was not sufficient as getIconsSet() returns a
reference to the SearchSet and it could then be used after the
mutex had been unlocked and while it was being modified in
initIconsSet() called in another thread.
2022-07-02 21:47:12 +02:00
Thierry Crozat
9dd4da4e4d
GUI: Change the mechanism to update the grid launcher after upding the icons
The icons download dialog was triggering the grid launcher update after
icons had been downloaded. But that means no update was done if the
dialog had been closed during the download.

Now the GUIManager triggers the update. This fixes the missing update
when hiding the download dialog while downloading an icon set.
2022-07-02 21:47:12 +02:00
Thierry Crozat
89853f9089
GUI: Add mutex for the GuiManager icon set
GuiManager::initIconsSet is called from a callback of the iconset
download dialog, which runs in a separate thread. That means the
iconset can be accessed from two separate thread (the GUI thread,
and the download thread).

This was not an issue until the previous commit as closing the
download dialog while a download was ongoing would crash ScummVM.
But now that the crash is fixed, a race condition was possible.
2022-07-02 21:47:12 +02:00
Thierry Crozat
0d37dbe93e
GUI: Move icon download callbacks to the DialogState
This fixes a crash when hiding the DownloadIconsDialog while
downloading an icons pack.
2022-07-02 21:47:08 +02:00
antoniou79
ac8377286d
GUI: Fix mouse wheel on grid item tray
When using the mouse wheel (scroll up/down) in the Grid view, item tray for a selected game, ScummVM would exit

I didn't notice any side-effects from the fix, but someone more familiar with the code should confirm.
2022-07-02 12:03:31 +02:00
Cameron Cawley
a89beff87b GUI: Update the builtin theme 2022-06-30 23:15:48 +01:00
Filippos Karapetis
04a1f7dc47 GUI: Add missing domain when checking for subtitle config - bug #13629
This disallowed selecting "both" for speech and subtitles, as the
subtitles setting was never saved. A regression from d6dbf721b6.
2022-06-30 17:27:58 +03:00
antoniou79
2d0afce13c GUI: Fix infinite loop with mouse wheel over tab
Reported as regression in #13106

Comment link:  https://bugs.scummvm.org/ticket/13106#comment:4
2022-06-30 13:17:25 +03:00
Thierry Crozat
4213af2469 GUI: Fix crash in GridWidget when adding game to grid launcher
The crash was not systematic but occured in the case where adding
the game did not change the indexes for the first and last visible
items. The issue was that in setEntryList() was called it did not
cleat the _visibleEntryList array that still contained dangling
pointers to the old items in the _dataEntryList. In most cases
the _visibleEntryList would be updated with pointers to the new
items when calcVisibleEntries() was called from reflowLayout(),
before being used in assignEntriesToItems() (also called from
reflowLayout()). But if the indexes of the first and last visible
items did not change, _visibleEntryList was not updated and we
got a crash in assignEntriesToItems() when trying to access freed
memory.
2022-06-21 00:33:46 +01:00
Lothar Serra Mari
b15b2f519e I18N: Update GUI translations datafile 2022-06-17 18:57:31 +02:00
Thierry Crozat
4881b8fdec GUI: Add slider for Grid Launcher icon size 2022-06-12 22:15:18 +01:00
antoniou79
a5068eb9b0
GUI: Fix thumbnails for event recorder dialogue
Also prevent segmentation fault cases related to low-res or switching from low-res to hi-res

And fix memory leak related to loading and scaling of the thumbnail image

A lot of the updated logic is borrowed from the saveload-dialog.cpp for the simple list view (with the thumbnail to the right of the list).
2022-06-12 15:08:20 +02:00
Christian Kündig
95c6e3a11f
CREDITS: Add myself to the backend credits 2022-06-12 14:40:47 +02:00
Athanasios Antoniou
63e41ea078 GUI: Fix iconpath iconspath Confman key discrepancy
Fixes issue with unable to download icons update (from Misc Tab) even though an icons path is set in Paths tab.
2022-06-11 08:41:00 +03:00
Le Philousophe
ebbc0b09e9
GUI: Fix dangling pointer when _headerEntryList was reallocated
As we know the size of the array in advance we can preallocate it.
2022-06-10 11:13:58 +02:00
Eugene Sandulenko
226ab7d8a0
GUI: Fix grid list highlight after editing game. Bug #3960 2022-06-10 11:13:57 +02:00
Le Philousophe
929d60fdcc
GUI: When resizing grid make sure selected entry is displayed
Without this, at startup, the grid is not scrolled on the selected game.
2022-06-10 11:13:57 +02:00
Le Philousophe
77700ab06d
GUI: Implement setSelected in Grid and use it in launcher 2022-06-10 11:13:57 +02:00
Le Philousophe
f9aca7ee31
GUI: Don't store GridItemInfo items twice 2022-06-10 11:13:57 +02:00
Le Philousophe
572d5a2971
GUI: Apply filter even when changing sorting criteria 2022-06-10 11:13:53 +02:00
Eugene Sandulenko
dac4ba3e1d
GUI: Fix editing of colored string in List. Bug #13541 2022-06-09 19:17:28 +02:00
Eugene Sandulenko
0ee20d377d
GUI: Use heuristic for displaying demo names in grid launcher 2022-06-08 23:09:06 +02:00
Eugene Sandulenko
1732d0a5f8
GUI: Extract vanilla game title for using in the grid. Bug #13551 2022-06-08 01:38:10 +02:00
Torbjörn Andersson
1739660368
GUI: Fix caret position in list widget
Strip formatting from the list widget string before taking the length of
it to calculate the caret position. This can be seen e.g. in the save
dialog when not using the icon view.
2022-06-07 08:53:03 +02:00
Lothar Serra Mari
d51f3d2f72 I18N: Update GUI translation datafile 2022-06-05 20:33:46 +02:00
Thierry Crozat
cc29c8efc7 GUI: When dropping file, use parent directory for detection
The detection was done on the dropped path, so it worked when
dropping a directory, but not a file. Now we can drop a file
and it will run the detection on the parent directory.
2022-06-05 18:57:20 +01:00