Check if on Retina

100 views
Skip to first unread message

Gerald Brandt

unread,
Jun 14, 2013, 5:49:42 PM6/14/13
to wx-u...@googlegroups.com
Hi,

Is there any way to check if the program is currently on a retina display (using trunk)?

Gerald

Stefan Csomor

unread,
Jun 14, 2013, 6:32:17 PM6/14/13
to wx-u...@googlegroups.com
Hi Gerald

>Is there any way to check if the program is currently on a retina display
>(using trunk)?

I'm currently working on this, right now I could add this to wxDC

the native method is named backingScaleFactor, so we could name it

wxDC::GetBackingScaleFactor, this would return 2 eg for a dc of a window
on a retina screen.

Best,

Stefan

Gerald Brandt

unread,
Jun 14, 2013, 6:35:18 PM6/14/13
to wx-u...@googlegroups.com
Hi,
Sounds great! I'm assuming than that a simple check of GetBackingScalingFactor() == 1 would be a standard display? Is there a ticket on this I can monitor, to know when it's in?

Gerald
Message has been deleted

Stefan Csomor

unread,
Jun 19, 2013, 4:35:54 PM6/19/13
to wx-u...@googlegroups.com
Hi Gerald
>
>>>Is there any way to check if the program is currently on a retina
>> >display
>> >(using trunk)?
>>
>> I'm currently working on this, right now I could add this to wxDC
>>
>> the native method is named backingScaleFactor, so we could name it
>>
>> wxDC::GetBackingScaleFactor, this would return 2 eg for a dc of a
>> window
>> on a retina screen.
>>
>> Best,
>>
>> Stefan
>>
>
>Sounds great! I'm assuming than that a simple check of
>GetBackingScalingFactor() == 1 would be a standard display? Is there a
>ticket on this I can monitor, to know when it's in?

you can now ask a window GetContentScaleFactor(), if it's > 1.999 Š you
are on a retina display

Best,

STefan

Gerald Brandt

unread,
Jun 19, 2013, 5:53:28 PM6/19/13
to wx-u...@googlegroups.com
Stefan,

----- Original Message -----
> From: "Stefan Csomor" <cso...@advancedconcepts.ch>
> To: wx-u...@googlegroups.com
> Sent: Wednesday, June 19, 2013 3:35:54 PM
> Subject: Re: Check if on Retina
>
I'll update from SVN tomorrow and see how it works.

Thanks!

Gerald
Reply all
Reply to author
Forward
0 new messages