Commit Graph
124 Commits
Author SHA1 Message Date
aryanrawlani28 f8ee449227 GUI: RTL: Right align main list text 2020-06-22 00:03:02 +02:00
aryanrawlani28 1bd2701597 GUI: RTL: Fix caret position 2020-06-22 00:03:02 +02:00
Cameron Cawley cc5abf5ebb TTS: Fix crash when TextToSpeechManager is unavailable, clean up formatting 2020-05-27 12:43:49 +02:00
Eugene Sandulenko ac82bb8823 GUI: Sync constructors 2020-04-28 10:04:09 +02:00
Eugene Sandulenko 86712a3680 GUI: Initialize class variables in ListWidget 2020-04-27 14:46:58 +02:00
Eugene Sandulenko 9bea9fd5cf GUI: Sort games by dictionary, ignoring English articles 2020-04-24 10:54:00 +02:00
Eugene Sandulenko 86ac3aeafc GUI: Disable tab scroll buttons instead of making them invisible 2020-03-27 22:28:17 +01:00
aryanrawlani28 bd688cfbc1 GUI: properly display scrollbuttons at edge 2020-03-27 22:21:40 +01:00
Bastien Bouclet 6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet c566d02992 GUI: Add override markers where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet eb28c5a092 GUI: Use a dialog theme layout for the unknown game dialog 2020-01-04 10:56:25 +01:00
Bastien Bouclet c0d8b6d9fc GUI: Introduce dynamic layouts
Prior to this change, a GUI layout was only affected by the screen size.
Now, a layout can additionally be influenced by the GUI dialog and widgets
that uses it. This capability is leveraged to implement the following
features:

* Layout elements that are not bound to a GUI widget do not take space.
   This means that dialogs where the widgets shown depend on for example
   a feature being enabled at configure time no longer have blank spaces.
* Widgets can define a minimal required size for their contents not to be
   cut. For now this is only used for buttons so their width is always
   sufficient for their caption not to be cut. This mechanism could be
   applied to other widget types in the future.
2020-01-04 10:56:25 +01:00
Bastien Bouclet 41f2ef9745 GUI: Use the item at the click position in PopUpDialog
Fixes the having the drag in the dialog to change the selection on
platforms with a touch screen.
2019-11-24 14:06:25 +01:00
Bastien Bouclet 2c812a6b7a GUI: Add DropdownButtonWidget and use it in the launcher for mass add
DropdownButtonWidget is a button split in two parts vertically. Clicking
the left part triggers a default action. Clicking the right part shows a
list of other actions the user can choose from.

Using this widget on the launcher lets 'Mass add' be a secondary action
of the 'Add' button, removing the necessity of pressing the shift key to
access the feature.
2019-11-24 14:06:25 +01:00
Cameron Cawley 06b038a1c1 GUI: Fix crash when clicking and dragging a tab widget 2019-10-15 20:37:28 +01:00
D G Turner 30c366ee5d GUI: Add Missing Switch Default Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-03 06:03:46 +01:00
Cameron Cawley 014bef9eab BACKENDS: Add a default clipboard implementation 2019-09-21 22:16:01 +03:00
D G Turner e376abf650 GUI: Fix Missing Field Initializer in List Widget
This field was introduced by the TTS code changes, but only one of
the constructors was modified to set the default value.
2019-09-02 11:42:17 +01:00
Jaromir Wysoglad c2c4458253 JANITORIAL: Remove some trailing whitespaces 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 59631627c8 TTS: Fix reading of list widgets
The TTS read items from list widgets even when the mouse was
outside the widget
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 33f8aadfeb TTS: Add age to TTSVoice 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 318c6d7ec6 TTS: Finish implementing the Windows TTS manager 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad 8357e8e6bf TTS: Prepare for windows TTS
Add windows configuration in configure
Add basic skeleton to backends
Check if ttsMan is initialized in GUI
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad b5cebcbeae TTS: Add text to speech to the GUI. 2019-09-01 22:47:55 +03:00
Alexander Tkachev 0a3d6d8054 GUI: Fix TabWidget's < and > buttons
These were incorrectly positioned (typos in code, missing value in one
expression).
2019-08-03 04:35:48 -04:00
Alexander Tkachev c47b204ac3 GUI: Minor offsets fixes in Tooltip and EditTextWidget 2019-08-03 04:35:48 -04:00
Alexander Tkachev 9ba3cd594d GUI: Tune ScrollContainerWidget offsets
Well, it ain't a fix, because it's not exactly correct for any of the
themes. Yet it's the best for all of them. If I put what seems to be
correct, "modern" theme gets ruined, because it has this mystical 2px
offset in tabs/scrollcontainers.
2019-08-03 04:35:48 -04:00
Alexander Tkachev c91bcbfb94 GUI: Fix scrollbars
- removed +1px in ListWidget, added in lordhoto's 2007 commit 68eb28a
(aka r29971 in svn) `Fix for bug #1670082 "GUI: Modern theme gfx glitch
in launcher".`, because it made clip this last line of scrollbar in all
themes, which doesn't look good. In 2007 theme was written in .ini,
which is not the case now. I don't see any glitches after removing this
"fix";

- fixed how scrollbar top and bottom scroll buttons are drawn in
ThemeEngine::drawScrollbar: there were these weird magic numbers, but in
reality extra space that buttons should occupy is hardcoded in
scrollbar.cpp (ScrollBarWidget) and is just +1px.
2019-08-03 04:35:48 -04:00
Alexander Tkachev 99c2418d1a GUI: Rewrite Cloud tab
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
2019-07-30 14:51:41 -04:00
Thierry Crozat 63a6a3c3de GUI: show/hide virtual keyboard when the EditTextWidget gains/loses the focus 2019-02-16 17:20:57 +00:00
Bastien Bouclet c1bd6a250d GUI: Add some override markers 2018-11-14 20:27:41 +01:00
Bastien Bouclet 7c570d9b25 GUI: Don't display the ScrollContainer background inside tabs
Fixes #10645.
2018-11-14 20:27:41 +01:00
D G Turner efcd857083 GUI: Fix Mouse Wheel Input for Unknown Game Dialog.
This should also fix this for other instances of ScrollContainer, though
the dialogs / widgets may require the same change.

This fixes bug Trac #10741.
2018-10-11 05:52:02 +01:00
Bastien Bouclet ac4b2efd3f GUI: Clean up file browser path entry 2018-08-27 06:39:40 +02:00
Chatziargyriou Eleftheria 4188ba1252 GUI: Add editable path in file browser dialog 2018-08-22 00:39:51 +01:00
Thierry Crozat bd98c6f045 GUI: Handle continous scrolling in ScrollContainer
When keeping the scrollbar up or down arrow pressed in a
ScrollContainer is now scrolls continously, as it was
already doing in the ListWidget.
2018-07-24 00:27:11 +01:00
Thierry Crozat 211ef61fdf GUI: Set ScrollContainer single step to kLineHeight instead of 1 pixel
The single step is the amount of scroll done when clicking once on
the scrollbar up or down arrow. It used to be 1 entry, but for the
ScrollContainer 1 entry is 1 pixel, which was too litle. Now the
single step can be set to a multiple entries.
2018-07-24 00:27:11 +01:00
Thierry Crozat f7a4b74130 GUI: Fix container widgets not receiving events 2018-07-24 00:27:11 +01:00
Adrian Frühwirth c7f3416daa JANITORIAL: Remove trailing whitespace 2018-05-20 23:40:20 +02:00
Thierry Crozat 6ab6d76792 GUI: Add copy to clipboard shortcut for EditableWidget 2018-04-29 21:47:10 +01:00
Bastien Bouclet 4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Eugene Sandulenko b0affe5bf2 GUI: Added override specifiers 2018-03-28 12:47:23 +02:00
Bastien Bouclet 4d0bb753e4 GUI: Remove the ThemeItem draw queues
Drawing nows happens directly when the Dialog or Widget draw methods are
called. This makes it easy to debug why a particular low level draw
method was called, by inspecting the call stack.

This replaces the notion of "buffering" by two independant ways to
control what is drawn and where:
- The active layer is used to select whether the foreground or
  background part of the dialogs are rendered by the draw calls.
- The active surface is used to select if the draw calls affect the back
  buffer or the screen.

The foreground layer of the active dialog is drawn directly to the
screen. Its background layer is drawn to the back buffer. This way
widgets can restore the back buffer in order to update without having to
redraw the dialog's background.

Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-03-12 11:46:04 +01:00
Bastien Bouclet 7dc602f352 GUI: Fix the caret drawing over the scroll bar in the list widget
Also remove the unused linesWidth variable and fix the hlLeftPadding and
hlRightPadding widget attributes to actually work.

There are still issues remaining with the caret in the list widget due
to the ellipsis being used to shorten long text. Ellipsis is accounted
for when drawing the text but not when computing the caret position.
2018-01-27 18:12:53 +01:00
Bastien Bouclet 5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet fc37918130 GUI: Remove explicit redraw when scrolling the ScrollContainer
The redraw is already handled by the GUI main loop
2018-01-27 18:12:34 +01:00
Bastien Bouclet 0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet f5b335af10 GUI: Mark some fall-through cases as intentional
Comments explain how the num lock handling works before the
fall-through cases.
2017-08-06 17:55:33 +02:00
Thierry Crozat 91125bcbcd GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00
Willem Jan Palenstijn 7dd1a1e4f5 GUI: Increase tab title spacing 2017-03-01 00:24:06 +01:00