summaryrefslogtreecommitdiff
path: root/src/Fl_Return_Button.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Return_Button.cxx')
-rw-r--r--src/Fl_Return_Button.cxx9
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();
}