diff options
| author | Greg Ercolano <erco@seriss.com> | 2024-06-26 15:40:41 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2024-06-26 15:40:41 -0700 |
| commit | 5c7ba51be39a73d9d61522d99c7d50a29e95277c (patch) | |
| tree | 7b7405ad7580c6bdb50e5f8003812d6b3ae250e0 /FL | |
| parent | fe4c94b4dc5d3ddcd396748816f37efb1913ce42 (diff) | |
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
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Input_Choice.H | 12 |
1 files changed, 7 insertions, 5 deletions
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: |
