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)

scrollbar-thumb.png (3.4 KB ) - added by KapiX 4 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 by axeld, 8 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:2 by X512, 5 years ago

Scroll bar size is hardcoded by B_V_SCROLL_BAR_WIDTH, B_H_SCROLL_BAR_HEIGHT. Changing size may break layout in some programs.

comment:3 by pulkomandy, 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 diver, 5 years ago

Keywords: hidpi added

comment:5 by waddlesplash, 4 years ago

Resolution: fixed
Status: assignedclosed

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 X512, 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.

Last edited 4 years ago by X512 (previous) (diff)

comment:7 by waddlesplash, 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 pulkomandy, 4 years ago

Milestone: UnscheduledR1/beta3

comment:9 by KapiX, 4 years ago

Resize thumb of B_DOCUMENT_WINDOW_LOOK should be scaled as well.

by KapiX, 4 years ago

Attachment: scrollbar-thumb.png added

comment:10 by waddlesplash, 4 years ago

Yes, this is a decorator issue though and so deserves a separate ticket.

comment:11 by diver, 4 years ago

Resolution: fixed
Status: closedreopened

Scrollbars in Debugger, Sounds, Repositories, Shortcuts, Notifications, HaikuDepot still do not scale. BColumnListView related?

comment:12 by waddlesplash, 4 years ago

Resolution: fixed
Status: reopenedclosed

Yes, a separate ticket should be opened for that please.

Note: See TracTickets for help on using tickets.