diff options
author | Willem Jan Palenstijn | 2017-02-26 18:34:02 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2017-02-28 15:55:52 +0100 |
commit | 5510640dbcd1bda6ae41942ed56c9ac037fc5228 (patch) | |
tree | bca82176d700bce72a948f046bc4acb43a740d98 /gui/ThemeEngine.h | |
parent | af831f26b97590024218801528f50e008f3b2f72 (diff) | |
download | scummvm-rg350-5510640dbcd1bda6ae41942ed56c9ac037fc5228.tar.gz scummvm-rg350-5510640dbcd1bda6ae41942ed56c9ac037fc5228.tar.bz2 scummvm-rg350-5510640dbcd1bda6ae41942ed56c9ac037fc5228.zip |
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.)
Diffstat (limited to 'gui/ThemeEngine.h')
-rw-r--r-- | gui/ThemeEngine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 8a6db17dfd..9d8ed41738 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -388,7 +388,7 @@ public: void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, int titleVPad, WidgetStateInfo state = kStateEnabled); - void drawTabClip(const Common::Rect &r, const Common::Rect &clippingRect, int tabHeight, int tabWidth, + void drawTabClip(const Common::Rect &r, const Common::Rect &clippingRect, int tabHeight, const Common::Array<int> &tabWidths, const Common::Array<Common::String> &tabs, int active, uint16 hints, int titleVPad, WidgetStateInfo state = kStateEnabled); |