Modify

Opened 3 weeks ago

Closed 3 weeks ago

#24808 closed enhancement (fixed)

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

Reported by: dkiselev 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 dkiselev 3 weeks ago.
src path
JosmToggleDialog.2.patch (2.4 KB ) - added by dkiselev 3 weeks ago.
v2
JosmToggleDialog.3.patch (1.9 KB ) - added by dkiselev 3 weeks ago.
v3: Evaluate titlebar each time it's used

Download all attachments as: .zip

Change History (9)

by dkiselev, 3 weeks ago

Attachment: JosmToggleDialog.patch added

src path

comment:1 by stoecker, 3 weeks 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 dkiselev, 3 weeks ago

Attachment: JosmToggleDialog.2.patch added

v2

comment:2 by dkiselev, 3 weeks 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, 3 weeks 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 dkiselev, 3 weeks ago

Attachment: JosmToggleDialog.3.patch added

v3: Evaluate titlebar each time it's used

comment:4 by dkiselev, 3 weeks ago

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

comment:5 by gaben, 3 weeks ago

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

comment:6 by stoecker, 3 weeks ago

Resolution: fixed
Status: newclosed

In 19598/josm:

fix #24808 - patch by dkiselev - ToggleDialog headers height respecting gui.scale

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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