| [ Return to Bugs & Features | SVN ⇄ GIT ]
STR #380
Application: | FLTK Library |
Duplicate Of: | STR #3222 |
Status: | 2 - Closed w/o Resolution |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fl_Value_Slider should have controllable width/height for valuator portion |
Version: | 1.4-feature |
Created By: | wook.cinenet |
Assigned To: | rokan |
Fix Version: | None |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | wook.cinenet 17:06 May 06, 2004 |
| For large value fields (ie: 5 digits) and large text sizes, more than 2 digits don't fit in the standard 35 pixel wide/25 pixel high fields; Although the following code may be better located in Fl_Valuator.cxx/H, it has been has been installed and tested in Fl_Value_Slider.cxx/H.
Fl_Value_Slider.H: Before the first "public:" declaration, insert: int vwidth_, vheight_; Add the following methods as public: void valuator_width(int n) { vwidth_ = n; } int valuator_width() { return vwidth_; } void valuator_height(int n) { vheight_ = n; } int valuator_height() { return vheight_; }
in Fl_Value_Slider.cxx, in Fl_Value_Slider::Fl_Value_Slider(...) insert vwidth_ = 35; vheight_ = 25; just before the final close-brace of the constructor;
in Fl_Value_Slider::draw() replace: if (horizontal()) { bww = 35; sxx += 35; sww -= 35; } else { syy += 25; bhh = 25; shh -= 25; } with: if (horizontal()) { bww = vwidth_; sxx += vwidth_; sww -= vwidth_; } else { syy += vheight_; bhh = vheight_; shh -= vheight_; }
format appears to be doing the right thing, and all else seems right with the world.
Love, Wook
| |
|
#2 | mike 15:06 May 15, 2004 |
| This change cannot be applied until 1.2 since it changes the ABI... | |
|
#3 | AlbrechtS 12:52 Jul 19, 2015 |
| STR #3222 is a similar (identical?) proposal and includes a patch.
@OP (Wook): Thanks for your patch description. I'm closing this STR now. Please follow STR #3222 instead if you're still interested. | |
[ Return to Bugs & Features ]
|
| |