Modify

Opened 3 days ago

Last modified 2 hours ago

#24808 new enhancement

[patch] Get ToggleDialog Headers height to respect gui.scale

Reported by: dmitry.v.kiselev@… Owned by: team
Priority: normal Milestone: 26.07
Component: Core Version:
Keywords: Cc:

Description

When use increased gui.scale for high dpi monitors toggle dialogs headers appears to be to small. Right now it's height is hard-coded to 20px.

Reading gui.scale and applying it to header height improves UX.

I have preliminary version of patch attached.

Attachments (3)

JosmToggleDialog.patch (2.3 KB ) - added by dmitry.v.kiselev@… 3 days ago.
src path
JosmToggleDialog.2.patch (2.4 KB ) - added by Dmitry Kiselev <dmitry.v.kiselev@…> 2 days ago.
v2
JosmToggleDialog.3.patch (1.9 KB ) - added by Dmitry Kiselev <dmitry.v.kiselev@…> 2 days ago.
v3: Evaluate titlebar each time it's used

Download all attachments as: .zip

Change History (8)

by dmitry.v.kiselev@…, 3 days ago

Attachment: JosmToggleDialog.patch added

src path

comment:1 by stoecker, 3 days ago

Milestone: 26.07

First: Do not make this a static variable. This prevents changing it on runtime.

Second: Make it configurable, I.e. make the value you calculate a default value to a hidden setting (find a nice name :-).

by Dmitry Kiselev <dmitry.v.kiselev@…>, 2 days ago

Attachment: JosmToggleDialog.2.patch added

v2

comment:2 by Dmitry Kiselev <dmitry.v.kiselev@…>, 2 days ago

Is that a step in the right direction?

Not sure if gui.scale as a fallback is ok or you want it gone completely

this.titleHeight = Config.getPref().getInt("toggledialog.titlebar.height", 
            (int)(20 * Config.getPref().getDouble("gui.scale", 1.0)));

comment:3 by stoecker, 2 days ago

Yes. But make it a local variable (or a function or copy the single assignment line) which gets reevaluated each time. Prefs lookup is not a costly operation.

by Dmitry Kiselev <dmitry.v.kiselev@…>, 2 days ago

Attachment: JosmToggleDialog.3.patch added

v3: Evaluate titlebar each time it's used

comment:4 by Dmitry Kiselev <dmitry.v.kiselev@…>, 2 days ago

Updated, see "v3: Evaluate titlebar each time it's used" attachment

comment:5 by gaben, 2 hours ago

Summary: Enhancement: Get ToggleDialog Headers height to respect gui.scale[patch] Get ToggleDialog Headers height to respect gui.scale

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to dmitry.v.kiselev@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.