summaryrefslogtreecommitdiff
path: root/src/uicmd.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2012-11-14 09:56:01 -0300
committerJorge Arellano Cid <jcid@dillo.org>2012-11-14 09:56:01 -0300
commitf1a5856eeda2ee4c17dd7b1d4dfa0d8f4330ad3e (patch)
treec2e47588894418653eeb58b8050cf9e868ff34f9 /src/uicmd.cc
parentb56864d7c883b204f55bf31eb09fc30a68ab4f10 (diff)
Avoid scroll flickering with a custom tooltip class (TipWin) & a custom button
Removed the workaround [1] that added a full UI and viewport redraw to conceal the lingering tooltips bug [2]. It produced annoying scroll flickering when the mouse was in the UI but outside the viewport (e.g. over the panel). This is more a FLTK bug than anything; the FLTK team's plan is to fix it in FLTK3, and also extend the tooltips API. As FLTK3 may take long to be released, and porting dillo to it is non-trivial (if both events ever come to happen), this custom solution looks quite reasonable for the present times. The patch introduces a new CustButton class that uses TipWin, and thus the tooltip handling is no longer handled by FLTK. This patch switches the UI buttons to the new CustButton. 1] http://lists.auriga.wearlab.de/pipermail/dillo-dev/2011-July/008515.html 2] http://lists.auriga.wearlab.de/pipermail/dillo-dev/2011-July/008494.html
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r--src/uicmd.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 40279a60..27ad7d49 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -107,7 +107,7 @@ class CustTabs : public Fl_Group {
Fl_Scroll *Scroll;
Fl_Pack *Pack;
Fl_Group *Control;
- CustLightButton *CloseBtn;
+ CustButton *CloseBtn;
int tabcolor_inactive, tabcolor_active;
void update_pack_offset(void);
@@ -151,12 +151,12 @@ public:
/* control buttons go inside a group */
Control = new Fl_Group(ww-ctl_w,0,ctl_w,ctab_h);
- CloseBtn = new CustLightButton(ww-ctl_w+2,0,btn_w,ctab_h, "X");
+ CloseBtn = new CustButton(ww-ctl_w+2,0,btn_w,ctab_h, "X");
CloseBtn->box(FL_THIN_UP_BOX);
CloseBtn->labelcolor(0x00641000);
CloseBtn->hl_color(FL_WHITE);
CloseBtn->clear_visible_focus();
- CloseBtn->tooltip(prefs.right_click_closes_tab ?
+ CloseBtn->set_tooltip(prefs.right_click_closes_tab ?
"Close current tab.\nor Right-click tab label to close." :
"Close current tab.\nor Middle-click tab label to close.");
CloseBtn->callback(close_tab_btn_cb, this);