1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-25 10:49:42 +02:00

Fix topbar icon rects

This commit is contained in:
Lars-Peter Clausen 2010-05-02 20:17:27 +02:00
parent d4490ba85c
commit 475fdb74b9

View File

@ -919,8 +919,8 @@ int GMenu2X::main() {
re.x = 0; re.y = 0; re.h = skinConfInt["topBarHeight"]; re.w = resX; re.x = 0; re.y = 0; re.h = skinConfInt["topBarHeight"]; re.w = resX;
if (ts.pressed() && ts.inRect(re)) { if (ts.pressed() && ts.inRect(re)) {
re.w = skinConfInt["linkWidth"]; re.w = skinConfInt["linkWidth"];
sectionsCoordX = halfX - (constrain((uint)menu->sections.size(), 0 , linkColumns) * skinConfInt["linkWidth"]) / 2;
for (i=menu->firstDispSection(); !ts.handled() && i<menu->sections.size() && i<menu->firstDispSection()+linkColumns; i++) { for (i=menu->firstDispSection(); !ts.handled() && i<menu->sections.size() && i<menu->firstDispSection()+linkColumns; i++) {
sectionsCoordX = halfX - (constrain((uint)(linkColumns-menu->sections.size()), 0 , linkColumns) * skinConfInt["linkWidth"]) / 2;
re.x = (i-menu->firstDispSection())*re.w+sectionsCoordX; re.x = (i-menu->firstDispSection())*re.w+sectionsCoordX;
if (ts.inRect(re)) { if (ts.inRect(re)) {