diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-06-27 15:20:23 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-06-27 15:20:23 +0000 |
| commit | a7670ae8d4d786df2c7936bfbbb7d4ba87d714be (patch) | |
| tree | 49cbec1bb00e6b1ed0fd789b1ad0e7a2f980d4b7 /src/Fl_Return_Button.cxx | |
| parent | 9801bb7839ae30cf448c40385610a72d758c2a73 (diff) | |
Fix button label clipping (STR #3237).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Return_Button.cxx')
| -rw-r--r-- | src/Fl_Return_Button.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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(); } |
