set relief for taskbar button even if flat_button
authorSHiNE CsyFeK <csyfek@users.sourceforge.net>
Wed, 11 Dec 2013 00:00:00 +0000 (00:00 +0000)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 15 Nov 2014 18:03:37 +0000 (20:03 +0200)
It would be more comfortable for user to see the whole button when mouse is over the buttons even if the 'flat_button' option is selected.

plugins/launchtaskbar.c

index f1cd5a8..5e2d9a7 100644 (file)
@@ -2646,8 +2646,10 @@ static void taskbar_button_enter(GtkWidget * widget, Task * tk)
 {
     tk->tb->dnd_task_moving = FALSE;
     tk->entered_state = TRUE;
-    if (tk->tb->flat_button)
+    if (tk->tb->flat_button) {
         gtk_widget_set_state(widget, GTK_STATE_NORMAL);
+        gtk_button_set_relief(GTK_BUTTON(tk->button), GTK_RELIEF_HALF);
+    }
     task_draw_label(tk);
 }
 
@@ -2655,6 +2657,9 @@ static void taskbar_button_enter(GtkWidget * widget, Task * tk)
 static void taskbar_button_leave(GtkWidget * widget, Task * tk)
 {
     tk->entered_state = FALSE;
+    if (tk->tb->flat_button) {
+        gtk_button_set_relief(GTK_BUTTON(tk->button), GTK_RELIEF_NONE);
+    }
     task_draw_label(tk);
 }