diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-03 17:18:42 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-08-03 17:18:42 -0400 |
commit | 6da70916b7f6178f480eec8e68d326e45715d4fd (patch) | |
tree | fd339112b52beca760a9c5deb594c93d053e8025 /src/ui.cc | |
parent | 23185b807ebdbed2b792dcb4abe729d2e7d17ba7 (diff) |
Moved CustLightButton into ui.hh
Also added hl_color() to change the highlight color.
Diffstat (limited to 'src/ui.cc')
-rw-r--r-- | src/ui.cc | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -154,33 +154,6 @@ int CustInput::handle(int e) //---------------------------------------------------------------------------- /* - * A button that highlights on mouse over - */ -class CustLightButton : public Fl_Button { - Fl_Color norm_color; -public: - CustLightButton(int x, int y, int w, int h, const char *l=0) : - Fl_Button(x,y,w,h,l) { norm_color = color(); }; - virtual int handle(int e); -}; - -int CustLightButton::handle(int e) -{ - if (active()) { - if (e == FL_ENTER) { - color(51); // {17,26,51} - redraw(); - } else if (e == FL_LEAVE || e == FL_RELEASE) { - color(norm_color); - redraw(); - } - } - return Fl_Button::handle(e); -} - -//---------------------------------------------------------------------------- - -/* * Used to handle "paste" within the toolbar's Clear button. */ class CustPasteButton : public CustLightButton { |