gnustep-dev
[Top][All Lists]
Advanced

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

Re: High-DPI screenshot


From: Eric Wasylishen
Subject: Re: High-DPI screenshot
Date: Wed, 13 Apr 2011 15:43:09 -0600

On 2011-04-13, at 5:52 AM, David Chisnall wrote:

> Very nice!  
Thanks!

> Also useful for accessibility, since it allows the user to magnify the 
> display nicely.  I wonder if we could improve on that even more, creating a 
> floating window that had a copy of the current view drawn into it at 2x 
> magnification.
> 
That would be cool - something like the loupe feature in Aperture?

> It would also be worth allowing -back to provide a default scale factor that 
> can be overridden, since both X11 and Win32 provide mechanisms for 
> interrogating the current display and finding the scale factor.
> 
Yeah. I've read a bit about what you need to do on win32 - you just have to 
tell Windows you're going to scale the window contents yourself (to disable the 
windows bitmap scaler), and then check the scale factor for each monitor.  
http://www.rw-designer.com/DPI-aware

What we should probably do is use the values reported for each screen from the 
backend, but allow globally overriding the scale factor with a User Default. 

> I wonder if you've thought about multi-monitor setups at all?  It's 
> increasingly common to have a laptop with one resolution and an external 
> display with another.  Ideally, you'd want windows to change their scale when 
> they moved from one screen to another, so they retained the same overall 
> size, but this is quite difficult to do in practice because you also have the 
> case where windows are overlapping two displays.
> 
> To do this really nicely, you'd want -back (or Cairo) to have some sort of 
> tee layer that could send display commands to two surfaces simultaneously, 
> and then split the window into n different parts, with different drawing 
> contexts rendering the differently scaled versions.  This would also need 
> non-rectangular window support, so would be really messy to get right.  As a 
> first approximation, however, just having the windows scale correctly when 
> they were moved entirely from one screen to another would be nice.
> 
I thought about the split-across-two-monitors case also, but I think it 
probably wouldn't be worth the effort. 

Luckily, changing the scale factor when a window moves entirely to a new screen 
should be really simple and clean to implement - the window decoration view to 
just has to listen to NSWindowDidChangeScreenNotification.

As an aside, it should be easy to set up a slider to adjust the scale factor in 
realtime - for a tech demo :-)

Eric

> David
> 
> On 12 Apr 2011, at 20:34, Eric Wasylishen wrote:
> 
>> Hey,
>> Here's a screenshot of a patch I'm working on which scales the UI for high 
>> DPI monitors - I think it's pretty cool :-)
>> 
>> It was surprisingly easy to implement. The actual scaling is done simply by 
>> changing the bounds and frame rects in GSWindowDecorationView (no changes in 
>> -back, and it works with cairo/art/xlib). You can set an arbitrary scale 
>> factor via a GSScaleFactor user default. Other than that, there were just a 
>> couple of bugs to fix to get it to work (and still some bugs remaining, but 
>> it's at least usable.)
>> 
>> I'll commit this after the upcoming release.
>> 
>> Cheers,
>> Eric
>> 
>> <highdpi.png>
>> 
>> _______________________________________________
>> Gnustep-dev mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/gnustep-dev
> 
> 
> -- Sent from my IBM 1620
> 




reply via email to

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