+ if (panel_horizontal) {
+ // panel horizonal => fixed height and posy
+ battery->area.posy = panel->area.pix.border.width + panel->area.paddingy;
+ battery->area.height = panel->area.height - (2 * battery->area.posy);
+ }
+ else {
+ // panel vertical => fixed width, height, posy and posx
+ battery->area.posy = panel->clock.area.posy + panel->clock.area.height + panel->area.paddingx;
+ battery->area.height = (2 * battery->area.paddingxlr) + (bat_time_height + bat_percentage_height);
+ battery->area.posx = panel->area.pix.border.width + panel->area.paddingy;
+ battery->area.width = panel->area.width - (2 * panel->area.pix.border.width) - (2 * panel->area.paddingy);
+ }
+
+ battery->bat1_posy = (battery->area.height - bat_percentage_height) / 2;