Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338705

Summary: [ScrollBar] Hide knob-icon when knob is too small
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: rsternberg, ruediger.herrmann, tbuschto
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot of minimum knob size on GTK and Mac none

Description Tim Buschtoens CLA 2011-03-02 12:32:27 EST
The little icon displayed at the cener of every scrollbar-knob looks out-of-place if the knob gets too small to show it. It should then be hidden automatically.
Comment 1 Tim Buschtoens CLA 2011-03-21 10:16:12 EDT
Fixed in CVS HEAD. MultiCellWidget now has the function "setCellVisible".
Comment 2 Ralf Sternberg CLA 2011-03-21 11:06:31 EDT
Wouldn't it make sense to define a minimal size for the knob instead? This size should be large enough to display the image. That's what it seems to be like in GTK.

I'm afraid that it would be hard to recognize and to operate the knob in case it gets too small.
Comment 3 Tim Buschtoens CLA 2011-03-21 11:56:58 EDT
There already is a minimal size for the knob, but its not dependent on the size of the icon. Thats how it works in windows. 

I think its better this way because, the knob-height in relation to the scrollbar-height represents the height of the widgets clientarea in relation to its content (scroll-height). The more it deviates from the target-size, the more inaccurate this model gets. The min-size of the knob (8px) is just so its still draggable at all when the widget content is really big. Since the icon is themeable, it could force the knob to any size whatsoever.
Comment 4 Ralf Sternberg CLA 2011-03-21 13:46:08 EDT
Created attachment 191628 [details]
Screenshot of minimum knob size on GTK and Mac

Here's a screenshot of the minimal size of the scrollbar knob on GTK and Mac. I still think that an 8px knob *without* the image is really hard to recognize, especially when other scrollbars have that image. I think we should not hide the image but maybe adapt the knob's min-size to the image.

But maybe we can also make the min-height themeable, this would leave the decision to the theming developer.
Comment 5 Tim Buschtoens CLA 2011-03-22 05:42:51 EDT
> But maybe we can also make the min-height themeable, this would leave the
> decision to the theming developer.

I think thats ideal. It would be another bug though. We should still hide the image if the knob gets too small (it wont if its themed correctly), because when part of the image is cut off that just looks  wrong.