Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Changing the slider thumb
Changing the slider thumb [message #39379] Thu, 14 March 2013 23:45 Go to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
I want to have a slider below a rectangle. But the horizontal slider points down by default, not up (to my liking). I searched and found the hthumb in Ctrllib/Ctrl.iml. To my surprise the thumbs look different than in my application (and in theide/layout designer). Where can I find the used image?
Or how can I go back to the thumbs in Ctrl.iml?
icon12.gif  Re: Changing the slider thumb [message #39443 is a reply to message #39379] Sat, 16 March 2013 15:25 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
This effect is on Linux (Ubuntu 12.04) only. The sliders look different on Windows with MSVC 10 as base for Build.
Within theide I get different sliders when I change Setup->Environment->IDE.GUI_Theme to Classic or Standard.
For my application I didn`t find a selector for GUI theme. But if I check NO_GTK in the configuration flags then the sliders change as well.
The question remaining is: Where does the GUI theme "Host Platform" get the slider thumbs from?
Answer: As GTK theming is applied (the only use of GTK I think) the thumb is retrieved from a gtk_theming_engine residing somewhere in a shared library.
NB.: As theming is based on GTK-2 --what I deduce from the names of the engines handled in the code -- but most applications on my machine use GTK-3 I stopped searching any further. The consequence is NO_GTK (better name NO_GTK_THEMES) or not using standard sliders but those within Controls4u.

[Updated on: Wed, 20 March 2013 15:27]

Report message to a moderator

Re: Changing the slider thumb [message #39478 is a reply to message #39379] Wed, 20 March 2013 16:23 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Did you have a look to SliderCtrlX in bazaar (Controls4U) ? This control can have various thumbs, and it's quite easy to add more if you want !

As far as I remember, I think that I had the same question about the origin of the image of the thumb. But as anyway I wanted to have my owns, I did not look for the answer.

SliderCtrlX is a widget that allows entering an integer value by dragging a thumb. Compared to SliderCtrl, it has several enhanced capabilities :
  • Has an adjustable scale with adjustable major and minor ticks,
  • The value can be set continuously or step by step with adjustable value of steps,
  • Can be used as indicator, with not draggable thumb,
  • Colored value bar, with adjustable color and width,
  • Several thumb shapes and possibility to have a customized thumb,
  • The scale can be inverted,
  • Possibility to position directly the thumb by a mouse click,
  • Multiple units for scale, like hours/mn/s alowing it to be used as video progress counter.


Use it or not, I'd be happy to have your opinion.

[Updated on: Wed, 20 March 2013 16:28]

Report message to a moderator

Re: Changing the slider thumb [message #39486 is a reply to message #39478] Thu, 21 March 2013 16:50 Go to previous messageGo to next message
ManfredHerr is currently offline  ManfredHerr
Messages: 67
Registered: February 2013
Location: Germany
Member
Yes, I did find the Controls4U-demo and the sliders shown there look very nice, imho. This is why I mentioned them in my previous post for other newbies coming across this topic.
For my purpose it is enough to set NO_GTK. I inherited the sliders from PointCtrl and they do what I need.
I'm not a fan of theming, I'd rather adhere to the "Form Follows Function" - principle. Very Happy
And another wise saying this direction: "The biggest enemy of the engineer is the designer!" (Hopefully you're not concerned Rolling Eyes )
Re: Changing the slider thumb [message #39529 is a reply to message #39379] Tue, 26 March 2013 10:23 Go to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi ManfredHerr,

Thank you for your comments Smile (and sorry to be late to reply...)

Yes, in your case, SliderCtrlX would probably be like taking a bazooka to kill a mosquito ! I proposed that just if you find no other way to do what you want... or if you wish to have thumbs of your own design. Anyway, who can do more can do less !

I planned to allow customized thumbs by the user, in addition to predefined ones, and finally did not do that only because I was missing time and nobody was asking for that, but it could easily be done... by myself or anybody who wants Wink

[Updated on: Tue, 26 March 2013 10:28]

Report message to a moderator

Previous Topic: [SUCCESS] Struggle with Serial port class
Next Topic: compiling issue at Win 7
Goto Forum:
  


Current Time: Thu Mar 28 16:17:55 CET 2024

Total time taken to generate the page: 0.01262 seconds