[Scummvm-cvs-logs] SF.net SVN: scummvm:[35021] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Nov 12 14:07:42 CET 2008
Revision: 35021
http://scummvm.svn.sourceforge.net/scummvm/?rev=35021&view=rev
Author: fingolfin
Date: 2008-11-12 13:07:41 +0000 (Wed, 12 Nov 2008)
Log Message:
-----------
GUI: Turn scrollbar width into a theme variable
Modified Paths:
--------------
scummvm/trunk/gui/ListWidget.cpp
scummvm/trunk/gui/ScrollBarWidget.h
scummvm/trunk/gui/console.cpp
scummvm/trunk/gui/themes/default.inc
scummvm/trunk/gui/themes/scummclassic/classic_layout.stx
scummvm/trunk/gui/themes/scummclassic/classic_layout_320.stx
scummvm/trunk/gui/themes/scummclassic.zip
scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_320.stx
scummvm/trunk/gui/themes/scummmodern.zip
Modified: scummvm/trunk/gui/ListWidget.cpp
===================================================================
--- scummvm/trunk/gui/ListWidget.cpp 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/ListWidget.cpp 2008-11-12 13:07:41 UTC (rev 35021)
@@ -491,11 +491,7 @@
_hlLeftPadding = g_gui.xmlEval()->getVar("Globals.ListWidget.hlLeftPadding", 0);
_hlRightPadding = g_gui.xmlEval()->getVar("Globals.ListWidget.hlRightPadding", 0);
- if (g_gui.getWidgetSize() == kBigWidgetSize) {
- _scrollBarWidth = kBigScrollBarWidth;
- } else {
- _scrollBarWidth = kNormalScrollBarWidth;
- }
+ _scrollBarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
// HACK: Once we take padding into account, there are times where
// integer rounding leaves a big chunk of white space in the bottom
Modified: scummvm/trunk/gui/ScrollBarWidget.h
===================================================================
--- scummvm/trunk/gui/ScrollBarWidget.h 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/ScrollBarWidget.h 2008-11-12 13:07:41 UTC (rev 35021)
@@ -30,12 +30,6 @@
namespace GUI {
enum {
- kNormalScrollBarWidth = 9,
- kBigScrollBarWidth = 15
-};
-
-
-enum {
kSetPositionCmd = 'SETP'
};
Modified: scummvm/trunk/gui/console.cpp
===================================================================
--- scummvm/trunk/gui/console.cpp 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/console.cpp 2008-11-12 13:07:41 UTC (rev 35021)
@@ -114,11 +114,7 @@
_h = _h * kConsoleLineHeight + 2;
// Set scrollbar dimensions
- int scrollBarWidth;
- if (g_gui.getWidgetSize() == kBigWidgetSize)
- scrollBarWidth = kBigScrollBarWidth;
- else
- scrollBarWidth = kNormalScrollBarWidth;
+ int scrollBarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
_scrollBar->resize(_w - scrollBarWidth - 1, 0, scrollBarWidth, _h);
_pageWidth = (_w - scrollBarWidth - 2 - _leftPadding - _topPadding - scrollBarWidth) / kConsoleCharWidth;
Modified: scummvm/trunk/gui/themes/default.inc
===================================================================
--- scummvm/trunk/gui/themes/default.inc 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/themes/default.inc 2008-11-12 13:07:41 UTC (rev 35021)
@@ -350,6 +350,9 @@
"<widget name='Console' "
"padding='7,5,5,5' "
"/> "
+"<widget name='Scrollbar' "
+"size='15,0' "
+"/> "
"<widget name='TabWidget.Tab' "
"size='75,27' "
"padding='0,0,8,0' "
@@ -959,6 +962,9 @@
"<widget name='Console' "
"padding='7,5,5,5' "
"/> "
+"<widget name='Scrollbar' "
+"size='9,0' "
+"/> "
"<widget name='TabWidget.Tab' "
"size='45,16' "
"padding='0,0,2,0' "
Modified: scummvm/trunk/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_layout.stx 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/themes/scummclassic/classic_layout.stx 2008-11-12 13:07:41 UTC (rev 35021)
@@ -75,6 +75,9 @@
<widget name = 'Console'
padding = '7, 5, 5, 5'
/>
+ <widget name = 'Scrollbar'
+ size = '15, 0'
+ />
<widget name = 'TabWidget.Tab'
size = '75, 27'
padding = '0, 0, 8, 0'
Modified: scummvm/trunk/gui/themes/scummclassic/classic_layout_320.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_layout_320.stx 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/themes/scummclassic/classic_layout_320.stx 2008-11-12 13:07:41 UTC (rev 35021)
@@ -71,6 +71,9 @@
<widget name = 'Console'
padding = '7, 5, 5, 5'
/>
+ <widget name = 'Scrollbar'
+ size = '9, 0'
+ />
<widget name = 'TabWidget.Tab'
size = '45, 16'
padding = '0, 0, 2, 0'
Modified: scummvm/trunk/gui/themes/scummclassic.zip
===================================================================
(Binary files differ)
Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx 2008-11-12 13:07:41 UTC (rev 35021)
@@ -80,6 +80,9 @@
<widget name = 'Console'
padding = '7, 5, 5, 5'
/>
+ <widget name = 'Scrollbar'
+ size = '15, 0'
+ />
<widget name = 'TabWidget.Tab'
size = '75, 27'
padding = '0, 0, 8, 0'
Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_320.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_320.stx 2008-11-12 13:01:21 UTC (rev 35020)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_320.stx 2008-11-12 13:07:41 UTC (rev 35021)
@@ -69,6 +69,9 @@
<widget name = 'Console'
padding = '7, 5, 5, 5'
/>
+ <widget name = 'Scrollbar'
+ size = '9, 0'
+ />
<widget name = 'TabWidget.Tab'
size = '45, 16'
padding = '0, 0, 2, 0'
Modified: scummvm/trunk/gui/themes/scummmodern.zip
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list