mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03: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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user