gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [proposed patch] GORM and hi-dpi


From: Graham Lee
Subject: Re: [proposed patch] GORM and hi-dpi
Date: Sun, 5 Feb 2017 21:33:43 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Hi Fred,

thanks for giving feedback.

On 05/02/17 19:15, Fred Kiefer wrote:
I think this patch is wrong and any similar patches for the other panels 
wouldn’t help. The method userSpaceScaleFactor was added by Eric six years ago 
and it should work automatically without any specific adjustments in the 
application code. Could you please explain what is the issue here and how your 
patch tries to address it?

What I see is that when GORM is scaled up, it correctly scales the views in the palettes but truncates them due to not drawing them into a large enough space. I've attached a screenshot showing the current behaviour.

The patch I attached scales the content view into which GORM is drawing the palette views, and fixes the bug as it appears in the screenshot.
Gorm here calls NSWindow initWithContentRect: and this should internally call 
frameRectForContentRect:styleMask: on GSWindowDecorationView and this should 
make just the adjustments your code is trying to make. The only issue I see 
there is that this code is using the scaling of the main screen. This will go 
wring if there are multiple screens with different scaling. If this is your 
problem we should address it in this class.

Thanks, I saw that it was calling -initWithContentRect: and that this was doing the correct thing with respect to scaling other windows (further, I saw that if I modified this method, then other windows including standard framework things like alert panels would be drawn incorrectly). So the problem is presumably specifically down to how GORM is drawing its palettes, which is why I made the change where I did.

What I see in GormCore is that the views added to this window's contentView are actually removed from it and added as subviews of a different view, in -[GormPaletteManager setCurrentPalette:]. It may be that the scaling is going wrong here, but again I do not see why that would be so.

Thanks for your help,
Graham.

Attachment: gorm-scale-2.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]