Mouse effects: changed defaults + disabled pixmap caching
This commit is contained in:
parent
96b9a46c07
commit
095b311edc
4 changed files with 19 additions and 10 deletions
|
@ -217,9 +217,9 @@ void add_entry (char *key, char *value)
|
|||
if (!read_border_color_hover)
|
||||
memcpy(&bg->border_hover, &bg->border, sizeof(Color));
|
||||
if (!read_bg_color_press)
|
||||
memcpy(&bg->back_pressed, &bg->back, sizeof(Color));
|
||||
memcpy(&bg->back_pressed, &bg->back_hover, sizeof(Color));
|
||||
if (!read_border_color_press)
|
||||
memcpy(&bg->border_pressed, &bg->border, sizeof(Color));
|
||||
memcpy(&bg->border_pressed, &bg->border_hover, sizeof(Color));
|
||||
}
|
||||
Background bg;
|
||||
init_background(&bg);
|
||||
|
@ -1043,9 +1043,9 @@ int config_read_file (const char *path)
|
|||
if (!read_border_color_hover)
|
||||
memcpy(&bg->border_hover, &bg->border, sizeof(Color));
|
||||
if (!read_bg_color_press)
|
||||
memcpy(&bg->back_pressed, &bg->back, sizeof(Color));
|
||||
memcpy(&bg->back_pressed, &bg->back_hover, sizeof(Color));
|
||||
if (!read_border_color_press)
|
||||
memcpy(&bg->border_pressed, &bg->border, sizeof(Color));
|
||||
memcpy(&bg->border_pressed, &bg->border_hover, sizeof(Color));
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -377,7 +377,9 @@ void set_taskbar_state(Taskbar *tskbar, int state)
|
|||
tskbar->area.pix = tskbar->state_pix[state];
|
||||
if (taskbarname_enabled) {
|
||||
tskbar->bar_name.area.bg = panel1[0].g_taskbar.background_name[state];
|
||||
tskbar->bar_name.area.pix = tskbar->bar_name.state_pix[state];
|
||||
if (!panel_config.mouse_effects) {
|
||||
tskbar->bar_name.area.pix = tskbar->bar_name.state_pix[state];
|
||||
}
|
||||
}
|
||||
if (panel_mode != MULTI_DESKTOP) {
|
||||
if (state == TASKBAR_NORMAL)
|
||||
|
@ -388,8 +390,14 @@ void set_taskbar_state(Taskbar *tskbar, int state)
|
|||
if (tskbar->area.on_screen == 1) {
|
||||
if (tskbar->state_pix[state] == 0)
|
||||
tskbar->area.redraw = 1;
|
||||
if (taskbarname_enabled && tskbar->bar_name.state_pix[state] == 0)
|
||||
tskbar->bar_name.area.redraw = 1;
|
||||
if (taskbarname_enabled) {
|
||||
if (!panel_config.mouse_effects) {
|
||||
if (tskbar->bar_name.state_pix[state] == 0)
|
||||
tskbar->bar_name.area.redraw = 1;
|
||||
} else {
|
||||
tskbar->bar_name.area.redraw = 1;
|
||||
}
|
||||
}
|
||||
if (panel_mode == MULTI_DESKTOP && panel1[0].g_taskbar.background[TASKBAR_NORMAL] != panel1[0].g_taskbar.background[TASKBAR_ACTIVE]) {
|
||||
GList *l = tskbar->area.children;
|
||||
if (taskbarname_enabled) l = l->next;
|
||||
|
|
|
@ -119,7 +119,8 @@ void draw_taskbarname (void *obj, cairo_t *c)
|
|||
Color *config_text = (taskbar->desktop == server.desktop) ? &taskbarname_active_font : &taskbarname_font;
|
||||
|
||||
int state = (taskbar->desktop == server.desktop) ? TASKBAR_ACTIVE : TASKBAR_NORMAL;
|
||||
taskbar_name->state_pix[state] = taskbar_name->area.pix;
|
||||
if (!panel_config.mouse_effects)
|
||||
taskbar_name->state_pix[state] = taskbar_name->area.pix;
|
||||
|
||||
// draw content
|
||||
layout = pango_cairo_create_layout (c);
|
||||
|
|
|
@ -767,9 +767,9 @@ void finalize_bg()
|
|||
}
|
||||
if (!read_border_color_press) {
|
||||
GdkColor fillColor;
|
||||
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_border_color), &fillColor);
|
||||
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_border_color_over), &fillColor);
|
||||
gtk_color_button_set_color(GTK_COLOR_BUTTON(background_border_color_press), &fillColor);
|
||||
int fillOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color));
|
||||
int fillOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color_over));
|
||||
gtk_color_button_set_alpha(GTK_COLOR_BUTTON(background_border_color_press), fillOpacity);
|
||||
background_force_update();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue