diff options
author | Max Horn | 2008-11-12 13:07:41 +0000 |
---|---|---|
committer | Max Horn | 2008-11-12 13:07:41 +0000 |
commit | 190468c79a56eb75e7bdcb2bb558042e347a74d1 (patch) | |
tree | 719dec98a722fba01566448128e844b8b9c7ba60 | |
parent | 42533c2354e0f6aa78f3d2cf219d13ef15ab6ccc (diff) | |
download | scummvm-rg350-190468c79a56eb75e7bdcb2bb558042e347a74d1.tar.gz scummvm-rg350-190468c79a56eb75e7bdcb2bb558042e347a74d1.tar.bz2 scummvm-rg350-190468c79a56eb75e7bdcb2bb558042e347a74d1.zip |
GUI: Turn scrollbar width into a theme variable
svn-id: r35021
-rw-r--r-- | gui/ListWidget.cpp | 6 | ||||
-rw-r--r-- | gui/ScrollBarWidget.h | 6 | ||||
-rw-r--r-- | gui/console.cpp | 6 | ||||
-rw-r--r-- | gui/themes/default.inc | 6 | ||||
-rw-r--r-- | gui/themes/scummclassic.zip | bin | 43674 -> 43779 bytes | |||
-rw-r--r-- | gui/themes/scummclassic/classic_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummclassic/classic_layout_320.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern.zip | bin | 144131 -> 144236 bytes | |||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout.stx | 3 | ||||
-rw-r--r-- | gui/themes/scummmodern/scummmodern_layout_320.stx | 3 |
10 files changed, 20 insertions, 16 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index cea4d94e13..5e7f417704 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -491,11 +491,7 @@ void ListWidget::reflowLayout() { _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 diff --git a/gui/ScrollBarWidget.h b/gui/ScrollBarWidget.h index 5352bdcf73..9379736f05 100644 --- a/gui/ScrollBarWidget.h +++ b/gui/ScrollBarWidget.h @@ -30,12 +30,6 @@ namespace GUI { enum { - kNormalScrollBarWidth = 9, - kBigScrollBarWidth = 15 -}; - - -enum { kSetPositionCmd = 'SETP' }; diff --git a/gui/console.cpp b/gui/console.cpp index cad65b03d6..92e5132c22 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -114,11 +114,7 @@ void ConsoleDialog::init() { _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; diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 7a5637d85d..aa38639ee1 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -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' " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip Binary files differindex 8f5435bb1c..91b5362f55 100644 --- a/gui/themes/scummclassic.zip +++ b/gui/themes/scummclassic.zip diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 46c1ee105e..005230b569 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -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' diff --git a/gui/themes/scummclassic/classic_layout_320.stx b/gui/themes/scummclassic/classic_layout_320.stx index c2694665a6..16e71731e9 100644 --- a/gui/themes/scummclassic/classic_layout_320.stx +++ b/gui/themes/scummclassic/classic_layout_320.stx @@ -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' diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip Binary files differindex e4af50c133..61cb8aa5e8 100644 --- a/gui/themes/scummmodern.zip +++ b/gui/themes/scummmodern.zip diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index ea83a9c291..6f8033e7bd 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -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' diff --git a/gui/themes/scummmodern/scummmodern_layout_320.stx b/gui/themes/scummmodern/scummmodern_layout_320.stx index 89aa3e4012..8ac6af33ef 100644 --- a/gui/themes/scummmodern/scummmodern_layout_320.stx +++ b/gui/themes/scummmodern/scummmodern_layout_320.stx @@ -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' |