Some parts of the given answer with code suggestions:
The problem is that the size is hardcoded to 35 for horizontal or 25 for vertical. You need to modify Fl_Value_Slider.cxx. In the routine draw, it has
if (horizontal()) {
bww = 35; sxx += 35; sww -= 35;
} else {
syy += 25; bhh = 25; shh -= 25;
}
This is based on a textsize of 10. If you change the text size, then it needs to go up based on the text size. Something like
if (horizontal()) {
int width = textsize() * 3 + 5;
bww = width; sxx += width; sww -= width;
} else {
int height = textsize() * 2 + 5;
syy += height; bhh = height; shh -= height;
}
Then rebuild the fltk library. Either keep this patch or send it to FLTK ...
Thanks to cup for this answer and patch suggestion. I can't tell if this is the correct or best patch but it's something that should be considered.
In the final version this should likely get a new method to set the different drawing sizes. This is not only true for Fl_Hor_Value_Slider but also for several other slider types and even some more widgets.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
[ Direct Link to Message ] |