GUI: Turn scrollbar width into a theme variable

svn-id: r35021
This commit is contained in:
Max Horn 2008-11-12 13:07:41 +00:00
parent 42533c2354
commit 190468c79a
10 changed files with 20 additions and 16 deletions

View file

@ -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

View file

@ -29,12 +29,6 @@
namespace GUI {
enum {
kNormalScrollBarWidth = 9,
kBigScrollBarWidth = 15
};
enum {
kSetPositionCmd = 'SETP'
};

View file

@ -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;

View file

@ -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' "

Binary file not shown.

View file

@ -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'

View file

@ -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'

Binary file not shown.

View file

@ -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'

View file

@ -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'