aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-08-05 21:39:27 -0400
committerJorge Arellano Cid <jcid@dillo.org>2011-08-05 21:39:27 -0400
commitd82e30730d03774b7dc7c1dca93778ea4e487189 (patch)
tree79ad62ca29ebf3c3de3d564ff0bf56fb55d0dfb9 /src
parent4985a98fac736bde82bdd1860f7d732efb3e2a6f (diff)
Fixed CustLightButton "light" color deactivation
When hiding, or leaving a highlighted button into another tab, the "light" state lingered. This was specially nasty on deactivated buttons as there was no easy way to recover the normal state. e.g. * Keep the mouse over Stop until the page fully loads. * With mouse over Forw, go forward with keyboard until the end. * Mouse over Home, Ctrl-t, mouse click previous tab. * Start loading a page, mouse over Stop, Ctrl-t, wait for the page to fully load, go back to the loading tab * Mouse ove Home, hide panels, move mouse, show panels. * etc.
Diffstat (limited to 'src')
-rw-r--r--src/ui.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui.hh b/src/ui.hh
index 3b61f69b..775a35ed 100644
--- a/src/ui.hh
+++ b/src/ui.hh
@@ -129,10 +129,13 @@ public:
if (e == FL_ENTER) {
color(light_color); // {17,26,51}
redraw();
- } else if (e == FL_LEAVE || e == FL_RELEASE) {
+ } else if (e == FL_LEAVE || e == FL_RELEASE || e == FL_HIDE) {
color(norm_color);
redraw();
}
+ } else if (e == FL_DEACTIVATE && color() != norm_color) {
+ color(norm_color);
+ redraw();
}
return Fl_Button::handle(e);
}