mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 12:18:27 +02:00
Simplify bottom bar button drawing in Selector
Put the drawButton calls left-to-right. Avoid duplicate code. The order was changed: "Select" is now always first, to be consistent with other dialogs.
This commit is contained in:
parent
3df841c150
commit
004c41e2ef
@ -62,16 +62,15 @@ int Selector::exec(int startSelection) {
|
|||||||
writeTitle(bg, link->getTitle());
|
writeTitle(bg, link->getTitle());
|
||||||
writeSubTitle(bg, link->getDescription());
|
writeSubTitle(bg, link->getDescription());
|
||||||
|
|
||||||
|
int x = 5;
|
||||||
|
x = gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"], x);
|
||||||
if (link->getSelectorBrowser()) {
|
if (link->getSelectorBrowser()) {
|
||||||
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
|
x = gmenu2x->drawButton(bg, "left", "", x);
|
||||||
gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"],
|
x = gmenu2x->drawButton(bg, "cancel", gmenu2x->tr["Up one folder"], x);
|
||||||
gmenu2x->drawButton(bg, "cancel", gmenu2x->tr["Up one folder"],
|
|
||||||
gmenu2x->drawButton(bg, "left", "", 5))));
|
|
||||||
} else {
|
} else {
|
||||||
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
|
x = gmenu2x->drawButton(bg, "cancel", "", x);
|
||||||
gmenu2x->drawButton(bg, "cancel", "",
|
|
||||||
gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"], 5)));
|
|
||||||
}
|
}
|
||||||
|
x = gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"], x);
|
||||||
|
|
||||||
unsigned int top, height;
|
unsigned int top, height;
|
||||||
tie(top, height) = gmenu2x->getContentArea();
|
tie(top, height) = gmenu2x->getContentArea();
|
||||||
|
Loading…
Reference in New Issue
Block a user