Commit graph

47 commits

Author SHA1 Message Date
aryanrawlani28
1ae2de366b GUI: RTL: Improve tab drawing for rtl 2020-06-22 00:03:02 +02:00
aryanrawlani28
9cd2ef1271 GUI: RTL: Cleanup tab drawing to make it simpler 2020-06-22 00:03:02 +02:00
aryanrawlani28
6211747fd3 GUI: RTL: Fix missing backgrounds for tabs in hebrew when navbars present 2020-06-22 00:03:02 +02:00
aryanrawlani28
19aa7baba7 GUI: RTL: Wrapping a variable used for rtl 2020-06-22 00:03:02 +02:00
aryanrawlani28
48eb0d095c GUI: RTL: Remove hardcoded padding for RTL tabs layout 2020-06-22 00:03:02 +02:00
aryanrawlani28
5c334d56ad GUI: RTL: Fix tabs for smallres and when removed 2020-06-22 00:03:02 +02:00
aryanrawlani28
b8a9331138 GUI: RTL: Shift to a better way of positioning when dialogs are stacked 2020-06-22 00:03:02 +02:00
aryanrawlani28
312862b541 GUI: RTL: Correctly draw backgrounds of Tabs 2020-06-22 00:03:02 +02:00
aryanrawlani28
c83e57fc69 GUI: JANITORIAL: Code cleanup, add comments 2020-06-22 00:03:02 +02:00
aryanrawlani28
cef4f20eec GUI: RTL: Support navigating in options dialog
GUI: RTL: Perfect drawing of tabs
2020-06-22 00:03:02 +02:00
aryanrawlani28
58704be218 GUI: RTL: Correctly draw tabs, consistent among screen sizes and different themes
GUI: RTL: Correctly draw theme-browser
2020-06-22 00:03:02 +02:00
aryanrawlani28
7e27af8148 GUI: Code cleanup 2020-06-22 00:03:02 +02:00
aryanrawlani28
f3e4e3e009 GUI: Code & comment cleanup, fix review issues 2020-06-22 00:03:02 +02:00
aryanrawlani28
c7469a1145 GUI: RTL: Base support for tab widgets 2020-06-22 00:03:02 +02:00
aryanrawlani28
d6a340d3b4 GUI: Cleanup hacky function for internal flip and fix review issues 2020-06-22 00:03:02 +02:00
aryanrawlani28
732e79b1cf GUI: RTL: Add disabled code for tab drawing 2020-06-22 00:03:02 +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
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
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
Jaromir Wysoglad
c2c4458253 JANITORIAL: Remove some trailing whitespaces 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
Adrian Frühwirth
c7f3416daa JANITORIAL: Remove trailing whitespace 2018-05-20 23:40:20 +02:00
Bastien Bouclet
4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Bastien Bouclet
5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 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
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
Willem Jan Palenstijn
5510640dbc GUI: Give each tab in TabWidget its own width
The width of each tab is now computed from its title, independently of
the other tabs. This increases the number of tabs that fit on the
screen.

This rewrite also fixes a bug where if the window size increased while
_firstVisibleTab > 0, some tabs would become inaccessible when the
scroll buttons were hidden.

The layout key Globals.TabWidget.Tab.Width is now treated as minimal
tab width. This is set so that the tabs fit reasonably well in lowres
layouts.

At the same time, this reduces the lowres scroll buttons heights to fit.

This patch makes the Nintento DS hacks in TabWidget obsolete.
(Hopefully! I'm not able to test.)
2017-02-28 15:55:52 +01:00
rsn8887
45bd7a8b75 SDL: Fix erratic analog pointer + control options
Fixes erratic speeds in analog pointer motion
Implemented option to set analog/keyboard pointer speed
and control the analog joystick deadzone. The deadzone option appears
only if the build supports analog joystick (via JOY_ANALOG define)
2017-02-22 16:52:09 -06:00
Thierry Crozat
50847f9e03 GUI: Setting the active tab also ensures it is visible in the tab bar 2016-10-30 18:22:56 +00:00
Thierry Crozat
74b3b45c61 GUI: Fix possible access to free'ed memory or double deletion in tab widget
The issue could occur when adding or removing widgets to a tab, and then
not switching to a different tab before the destructor or reflowLayout() were
called. In such a case the firstWidget of the current widget in the _tabs list
could be out of date. Accessing this first widget from the destructor or from
reflowLayout() could then cause a crash, or random issues caused to access
to free'ed memory. In theory this could also lead to a memory leak, although
I don't think this could occur in our current code.

Usually we add several tabs to a TabWidget and then switch back to the first
tab after building all the tabs. So in such a case the issue would not occur.
But because we are deleting and reconstructing the clear buttons for the
MIDI and Path tabs of the options dialog from reflowLayout(), if the current
tab is the Path tab, it would be kept as active tab after adding and removing
widget to it and the issue would occur.

This fixes bug #9618.
2016-10-22 21:32:16 +01:00
Alexander Tkachev
64a79fd1ab GUI: Fix TabWidget height issues
Changes theme stx files to specify TabWidget's type. That fixes wrong TabWidget height.

Changes TabWidget's getHeight() to return not only "children" height, but also tabs height. That fixes wrong clipping area.

Changes Widget's findWidget to use getHeight(). That fixes bug when widgets in the bottom of TabWidget were not reacting to the mouse events.
2016-07-12 22:37:57 +06:00
Alexander Tkachev
80412a4139 GUI: Add drawTabClip() 2016-07-03 12:22:10 +02:00
Alexander Tkachev
0ae4409138 GUI: Add ThemeLayoutTabWidget 2016-07-03 12:20:03 +02:00
Alexander Tkachev
24963ac97d GUI: Fix Dialog's and TabWidget's reflowLayout() 2016-07-03 12:19:48 +02:00
Zerophase
5c12e09ed1 GUI: Tab cycling handles multiple themes.
First visible tab moves up when a theme's width cannot fit another tab.
2014-04-06 19:58:56 -05:00
Zerophase
5df3c14eba GUI: Fix tab cycling when total tabs increase.
Tab cycling ignores tab width, and slides correctly for larger tab counts.
2014-04-01 07:28:57 -05:00
Zerophase
80d34a8a7c GUI: Add Tab cycling to TabWidget
Tab and Shift-Tab can now cycle between each Tab of the Edit Game menu.
2014-04-01 07:28:48 -05:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
f3f73a7832 GUI: Commit some changes missing in my previous commit (oops)
svn-id: r54266
2010-11-16 10:24:16 +00:00
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Renamed from gui/TabWidget.cpp (Browse further)