mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 07:29:44 +02:00
Added "bottomBarHeight" item to skin
There was already "topBarHeight", but the height of the bottom bar was still hardcoded.
This commit is contained in:
parent
13f91f9b7e
commit
19fc3cb4d1
@ -1,6 +1,7 @@
|
||||
wallpaper="blue-zero.png"
|
||||
linkHeight=50
|
||||
topBarHeight=50
|
||||
bottomBarHeight=21
|
||||
linkWidth=80
|
||||
topBarBg=#ffffff00
|
||||
bottomBarBg=#ffffff00
|
||||
|
@ -5,5 +5,6 @@ messageBoxBg=#00000080
|
||||
messageBoxSelection=#fffffff80
|
||||
bottomBarBg=#ffffff80
|
||||
topBarHeight=50
|
||||
bottomBarHeight=21
|
||||
linkHeight=50
|
||||
linkWidth=80
|
@ -5,5 +5,6 @@ messageBoxBg=#00000080
|
||||
messageBoxSelection=#fffffff80
|
||||
bottomBarBg=#ffffff80
|
||||
topBarHeight=50
|
||||
bottomBarHeight=21
|
||||
linkHeight=50
|
||||
linkWidth=80
|
@ -813,9 +813,10 @@ void GMenu2X::setSkin(const string &skin, bool setWallpaper) {
|
||||
}
|
||||
}
|
||||
|
||||
evalIntConf( &skinConfInt["topBarHeight"], 40, 32,120 );
|
||||
evalIntConf( &skinConfInt["linkHeight"], 40, 32,120 );
|
||||
evalIntConf( &skinConfInt["linkWidth"], 60, 32,120 );
|
||||
evalIntConf(&skinConfInt["topBarHeight"], 40, 32, 120);
|
||||
evalIntConf(&skinConfInt["bottomBarHeight"], 20, 20, 120);
|
||||
evalIntConf(&skinConfInt["linkHeight"], 40, 32, 120);
|
||||
evalIntConf(&skinConfInt["linkWidth"], 60, 32, 120);
|
||||
|
||||
if (menu != NULL) menu->skinUpdated();
|
||||
|
||||
@ -1195,8 +1196,8 @@ void GMenu2X::drawScrollBar(uint pageSize, uint totalSize, uint pagePos) {
|
||||
}
|
||||
|
||||
const uint top = skinConfInt["topBarHeight"] + 1;
|
||||
const uint bottomBarHeight = 21;
|
||||
const uint height = resY - top - (bottomBarHeight + 1);
|
||||
const uint bottom = skinConfInt["bottomBarHeight"] + 1;
|
||||
const uint height = resY - top - bottom;
|
||||
|
||||
s->rectangle(resX - 8, top, 7, height, skinConfColors[COLOR_SELECTION_BG]);
|
||||
|
||||
@ -1209,17 +1210,20 @@ void GMenu2X::drawScrollBar(uint pageSize, uint totalSize, uint pagePos) {
|
||||
|
||||
void GMenu2X::drawTopBar(Surface *s) {
|
||||
Surface *bar = sc.skinRes("imgs/topbar.png", false);
|
||||
if (bar != NULL)
|
||||
if (bar) {
|
||||
bar->blit(s, 0, 0);
|
||||
else
|
||||
s->box(0, 0, resX, skinConfInt["topBarHeight"],
|
||||
skinConfColors[COLOR_TOP_BAR_BG]);
|
||||
} else {
|
||||
const int h = skinConfInt["topBarHeight"];
|
||||
s->box(0, 0, resX, h, skinConfColors[COLOR_TOP_BAR_BG]);
|
||||
}
|
||||
}
|
||||
|
||||
void GMenu2X::drawBottomBar(Surface *s) {
|
||||
Surface *bar = sc.skinRes("imgs/bottombar.png", false);
|
||||
if (bar != NULL)
|
||||
if (bar) {
|
||||
bar->blit(s, 0, resY-bar->height());
|
||||
else
|
||||
s->box(0, resY-20, resX, 20, skinConfColors[COLOR_BOTTOM_BAR_BG]);
|
||||
} else {
|
||||
const int h = skinConfInt["bottomBarHeight"];
|
||||
s->box(0, resY - h, resX, h, skinConfColors[COLOR_BOTTOM_BAR_BG]);
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void Menu::paint(Surface &s) {
|
||||
|
||||
ConfIntHash &skinConfInt = gmenu2x->skinConfInt;
|
||||
const int topBarHeight = skinConfInt["topBarHeight"];
|
||||
const int bottomBarHeight = 21;
|
||||
const int bottomBarHeight = skinConfInt["bottomBarHeight"];
|
||||
const int linkWidth = skinConfInt["linkWidth"];
|
||||
const int linkHeight = skinConfInt["linkHeight"];
|
||||
RGBAColor &selectionBgColor = gmenu2x->skinConfColors[COLOR_SELECTION_BG];
|
||||
|
Loading…
Reference in New Issue
Block a user