Opened 8 years ago
Closed 4 years ago
#13170 closed bug (fixed)
[Interface Kit] scrollbars do not scale
Reported by: | diver | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | hidpi | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
With large font size most apps look good, however scrollbars do not scale unlike other elements and become tiny on HiDPI screens.
Attachments (1)
Change History (13)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
comment:3 by , 5 years ago
Indeed. But I think we can make it work at least with the layout kit.
Some notes:
- The scrollbar code itself in fact has no problem drawing at other sizes, this is just the default and can be overriden.
- We need to adjust the resize knob, which may be tricky because it is handled by the decorators; not by the client drawing.
- We could keep the small size (we will have to, in fact) for old apps that don't use the layout kit, except maybe if they use BScrollView and we can manage the scrollbar size from there, but even then, I'm not sure if we can get it to work. For layout-API apps it is not a problem (once the resize knob is dealt with) to change the size.
comment:4 by , 4 years ago
Keywords: | hidpi added |
---|
comment:5 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Done in hrev54400.
Replies to pulkomandy's notes:
- Indeed, I did not have to change any drawing code.
- I just added scaling to the resize knob based on the application's font size (after all, different applications may have different fonts and font sizes, so the decorators should not give us a scaled minimum resize knob size.)
- As far as I can tell, BScrollView's code compensates for the size the scrollbars take up for the view, so I just enabled the scaling code unconditionally, i.e. even in non-layout mode. Probably most layout-unaware applications will be unusable at large font sizes anyway, but if some are intelligent enough, the scroll view will also look correct.
comment:6 by , 4 years ago
I think that 12.0f
value should be not used directly here. At least some constant define should be used, for example B_DEFAULT_FONT_SIZE
.
comment:7 by , 4 years ago
There are other places in the code that already use 12.0f. Possibly we should make a constant for that, yes.
comment:8 by , 4 years ago
Milestone: | Unscheduled → R1/beta3 |
---|
by , 4 years ago
Attachment: | scrollbar-thumb.png added |
---|
comment:10 by , 4 years ago
Yes, this is a decorator issue though and so deserves a separate ticket.
comment:11 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Scrollbars in Debugger, Sounds, Repositories, Shortcuts, Notifications, HaikuDepot still do not scale. BColumnListView related?
comment:12 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Yes, a separate ticket should be opened for that please.
Scroll bar size is hardcoded by B_V_SCROLL_BAR_WIDTH, B_H_SCROLL_BAR_HEIGHT. Changing size may break layout in some programs.