mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 07:45:21 +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());
|
||||
writeSubTitle(bg, link->getDescription());
|
||||
|
||||
int x = 5;
|
||||
x = gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"], x);
|
||||
if (link->getSelectorBrowser()) {
|
||||
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
|
||||
gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"],
|
||||
gmenu2x->drawButton(bg, "cancel", gmenu2x->tr["Up one folder"],
|
||||
gmenu2x->drawButton(bg, "left", "", 5))));
|
||||
x = gmenu2x->drawButton(bg, "left", "", x);
|
||||
x = gmenu2x->drawButton(bg, "cancel", gmenu2x->tr["Up one folder"], x);
|
||||
} else {
|
||||
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
|
||||
gmenu2x->drawButton(bg, "cancel", "",
|
||||
gmenu2x->drawButton(bg, "accept", gmenu2x->tr["Select"], 5)));
|
||||
x = gmenu2x->drawButton(bg, "cancel", "", x);
|
||||
}
|
||||
x = gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"], x);
|
||||
|
||||
unsigned int top, height;
|
||||
tie(top, height) = gmenu2x->getContentArea();
|
||||
|
Loading…
Reference in New Issue
Block a user