From a7670ae8d4d786df2c7936bfbbb7d4ba87d714be Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 27 Jun 2015 15:20:23 +0000 Subject: Fix button label clipping (STR #3237). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Return_Button.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Fl_Return_Button.cxx') diff --git a/src/Fl_Return_Button.cxx b/src/Fl_Return_Button.cxx index 9e144b8ec..c816db0f7 100644 --- a/src/Fl_Return_Button.cxx +++ b/src/Fl_Return_Button.cxx @@ -40,12 +40,13 @@ int fl_return_arrow(int x, int y, int w, int h) { void Fl_Return_Button::draw() { if (type() == FL_HIDDEN_BUTTON) return; - draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), - value() ? selection_color() : color()); + Fl_Boxtype bt = value() ? (down_box()?down_box():fl_down(box())) : box(); + int dx = Fl::box_dx(bt); + draw_box(bt, value() ? selection_color() : color()); int W = h(); if (w()/3 < W) W = w()/3; - fl_return_arrow(x()+w()-W-4, y(), W, h()); - draw_label(x(), y(), w()-W+4, h()); + fl_return_arrow(x()+w()-(W+dx), y(), W, h()); + draw_label(x()+dx, y(), w()-(dx+W+dx), h()); if (Fl::focus() == this) draw_focus(); } -- cgit v1.2.3