fixed issue 97 and issue 95
git-svn-id: http://tint2.googlecode.com/svn/trunk@106 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
d47cfb0761
commit
597d492860
4 changed files with 18 additions and 20 deletions
|
@ -1,3 +1,6 @@
|
|||
2009-06-08
|
||||
- fixed issue 97 and issue 95
|
||||
|
||||
2009-06-08
|
||||
- allow 'taskbar_mode = multi_desktop' config with 'panel_monitor = all'
|
||||
|
||||
|
|
|
@ -255,6 +255,7 @@ void draw_battery (void *obj, cairo_t *c, int active)
|
|||
g_object_unref(layout);
|
||||
}
|
||||
|
||||
|
||||
void resize_battery(void *obj)
|
||||
{
|
||||
Battery *battery = obj;
|
||||
|
@ -292,23 +293,19 @@ void resize_battery(void *obj)
|
|||
|
||||
new_width += (2*battery->area.paddingxlr) + (2*battery->area.pix.border.width);
|
||||
|
||||
if(new_width > battery->area.width || new_width < (battery->area.width-6)) {
|
||||
int i;
|
||||
int old_width = battery->area.width;
|
||||
|
||||
Panel *panel = ((Area*)obj)->panel;
|
||||
|
||||
printf("battery_width %d, new_width %d\n", battery->area.width, new_width);
|
||||
|
||||
// resize battery
|
||||
// we try to limit the number of resize
|
||||
battery->area.width = new_width + 1;
|
||||
battery->area.posx = panel->area.width - battery->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
||||
if (panel->clock.area.on_screen)
|
||||
battery->area.posx -= (panel->clock.area.width + panel->area.paddingx);
|
||||
|
||||
// resize other objects on panel
|
||||
for (i=0 ; i < nb_panel ; i++)
|
||||
panel1[i].area.resize = 1;
|
||||
|
||||
if(new_width > old_width || new_width < (old_width-6)) {
|
||||
// refresh and resize other objects on panel
|
||||
// we try to limit the number of refresh
|
||||
printf("battery_width %d, new_width %d\n", battery->area.width, new_width);
|
||||
panel->area.resize = 1;
|
||||
systray.area.resize = 1;
|
||||
panel_refresh = 1;
|
||||
}
|
||||
|
|
|
@ -175,7 +175,6 @@ void resize_clock (void *obj)
|
|||
new_width += (2*clock->area.paddingxlr) + (2*clock->area.pix.border.width);
|
||||
|
||||
if (new_width > clock->area.width || new_width < (clock->area.width-6)) {
|
||||
int i;
|
||||
Panel *panel = ((Area*)obj)->panel;
|
||||
|
||||
printf("clock_width %d, new_width %d\n", clock->area.width, new_width);
|
||||
|
@ -185,9 +184,8 @@ void resize_clock (void *obj)
|
|||
clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
||||
|
||||
// resize other objects on panel
|
||||
for (i=0 ; i < nb_panel ; i++) {
|
||||
panel1[i].area.resize = 1;
|
||||
}
|
||||
panel->area.resize = 1;
|
||||
panel->battery.area.resize = 1;
|
||||
systray.area.resize = 1;
|
||||
panel_refresh = 1;
|
||||
}
|
||||
|
|
|
@ -620,7 +620,7 @@ load_config:
|
|||
}
|
||||
}
|
||||
}
|
||||
else event_timer();
|
||||
event_timer();
|
||||
|
||||
switch (signal_pending) {
|
||||
case SIGUSR1:
|
||||
|
|
Loading…
Reference in a new issue