mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 10:04:05 +02:00
Align the links the same way whether or not a scrollbar is present
Previously, when a scrollbar was present, the links were starting at a different X position than without the scrollbar.
This commit is contained in:
parent
c58b3a535e
commit
4347c340a6
@ -650,7 +650,7 @@ void GMenu2X::main() {
|
|||||||
uint sectionLinkPadding = (skinConfInt["topBarHeight"] - 32 - font->getLineHeight()) / 3;
|
uint sectionLinkPadding = (skinConfInt["topBarHeight"] - 32 - font->getLineHeight()) / 3;
|
||||||
|
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
int x,y, offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6;
|
int x,y;
|
||||||
int helpBoxHeight = 154;
|
int helpBoxHeight = 154;
|
||||||
uint i;
|
uint i;
|
||||||
long tickBattery = -60000, tickNow;
|
long tickBattery = -60000, tickNow;
|
||||||
@ -704,10 +704,10 @@ void GMenu2X::main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Links
|
//Links
|
||||||
s->setClipRect(offset,skinConfInt["topBarHeight"],resX-9,resY-74); //32*2+10
|
s->setClipRect(6,skinConfInt["topBarHeight"],resX-9,resY-74); //32*2+10
|
||||||
for (i=menu->firstDispRow()*linkColumns; i<(menu->firstDispRow()*linkColumns)+linksPerPage && i<menu->sectionLinks()->size(); i++) {
|
for (i=menu->firstDispRow()*linkColumns; i<(menu->firstDispRow()*linkColumns)+linksPerPage && i<menu->sectionLinks()->size(); i++) {
|
||||||
int ir = i-menu->firstDispRow()*linkColumns;
|
int ir = i-menu->firstDispRow()*linkColumns;
|
||||||
x = (ir%linkColumns)*(skinConfInt["linkWidth"]+linkSpacingX)+offset;
|
x = (ir%linkColumns)*(skinConfInt["linkWidth"]+linkSpacingX)+6;
|
||||||
y = ir/linkColumns*(skinConfInt["linkHeight"]+linkSpacingY)+skinConfInt["topBarHeight"]+2;
|
y = ir/linkColumns*(skinConfInt["linkHeight"]+linkSpacingY)+skinConfInt["topBarHeight"]+2;
|
||||||
menu->sectionLinks()->at(i)->setPosition(x,y);
|
menu->sectionLinks()->at(i)->setPosition(x,y);
|
||||||
|
|
||||||
@ -841,11 +841,9 @@ void GMenu2X::main() {
|
|||||||
break;
|
break;
|
||||||
case InputManager::ALTLEFT:
|
case InputManager::ALTLEFT:
|
||||||
menu->decSectionIndex();
|
menu->decSectionIndex();
|
||||||
offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6;
|
|
||||||
break;
|
break;
|
||||||
case InputManager::ALTRIGHT:
|
case InputManager::ALTRIGHT:
|
||||||
menu->incSectionIndex();
|
menu->incSectionIndex();
|
||||||
offset = menu->sectionLinks()->size()>linksPerPage ? 2 : 6;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user