From 5c7ba51be39a73d9d61522d99c7d50a29e95277c Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Wed, 26 Jun 2024 15:40:41 -0700 Subject: Fix Fl_Input_Choice vs Fl_Choice drawing issues (#978) Differences in size of arrows and overall look varies with different schemes applied for issue raised by Philip Rose first on fltk.general: Subject: Discrepancy between Fl_Choice and Fl_Input_Choice --- FL/Fl_Input_Choice.H | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H index f61d664b6..9f6c2df52 100644 --- a/FL/Fl_Input_Choice.H +++ b/FL/Fl_Input_Choice.H @@ -72,7 +72,7 @@ protected: /** See inp_x() for info. */ virtual int inp_y() const { return(y() + Fl::box_dy(box())); } /** See inp_x() for info. */ - virtual int inp_w() const { return(w() - Fl::box_dw(box()) - 20); } + virtual int inp_w() const { return(w() - Fl::box_dw(box()) - menu_w()); } /** See inp_x() for info. */ virtual int inp_h() const { return(h() - Fl::box_dh(box())); } @@ -81,13 +81,15 @@ protected: These can be overridden by a subclass to redefine positioning. See code example in the Description for subclassing details. */ - virtual int menu_x() const { return(x() + w() - 20 - Fl::box_dx(box())); } + virtual int menu_x() const { return x() + w() - menu_w() - Fl::box_dx(box()); } /** See menu_x() for info. */ - virtual int menu_y() const { return(y() + Fl::box_dy(box())); } + virtual int menu_y() const { return y() + Fl::box_dy(box()); } /** See menu_x() for info. */ - virtual int menu_w() const { return(20); } + virtual int menu_w() const { return 20; } /** See menu_x() for info. */ - virtual int menu_h() const { return(h() - Fl::box_dh(box())); } + virtual int menu_h() const { return h() - Fl::box_dh(box()); } + + void draw() FL_OVERRIDE; public: -- cgit v1.2.3