Обсуждение: pgAdmin 4 v1.0: Problems with high dpi scaling on Win10
<div class="WordSection1"><p class="MsoNormal"><span lang="EN-US">Hi list, hi Dave, </span><p class="MsoNormal"><span lang="EN-US"> </span><pclass="MsoNormal"><span lang="EN-US">On Windows 10 using a high res screen with high dpi scaling turnedon and set to 200%, the text in the pgAdmin 4 (standalone) interface becomes almost illegible. </span><p class="MsoNormal"><spanlang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">The issue seems to be that pgAdmin claimsto Windows that is high dpi aware when it actually isn’t. See <a href="http://doc.qt.io/qt-5/highdpi.html">http://doc.qt.io/qt-5/highdpi.html</a>for more info about how QT deals with highdpi issues. </span><p class="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">The shortterm solution would be to make the app dpi unaware, thus letting Windows take care of the scaling. </span><p class="MsoNormal"><spanlang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">Here an extract of the page above thatseems relevant here:</span><p class="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">---snip---</span><pclass="MsoNormal"><span lang="EN-US">In order to get an application designed for low DPIvalues running on a high resolution monitors quickly, consider one of the scaling options (let the application run asDPI Unaware on Windows or set the environment variable QT_AUTO_SCREEN_SCALE_FACTOR to "1". These options may incur somescaling or painting artifacts, though.</span><p class="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><spanlang="EN-US">In the longer term, the application should be adapted to run unmodified:</span><p class="MsoListParagraph"style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span lang="EN-US"><span style="mso-list:Ignore">-<spanstyle="font:7.0pt "Times New Roman""> </span></span></span><span lang="EN-US">Alwaysuse the qreal versions of the QPainter drawing API.</span><p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0level1 lfo1"><span lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt"Times New Roman""> </span></span></span><span lang="EN-US">Size windows and dialogs in relationto the screen size.</span><p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><span lang="EN-US"><spanstyle="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman""> </span></span></span><spanlang="EN-US">Replace hard-coded sizes in layouts and drawing code by values calculated from fontmetrics or screen size</span><p class="MsoNormal"><span lang="EN-US">---snip---</span><p class="MsoNormal"><span lang="EN-US"> </span><pclass="MsoNormal"><span lang="EN-US">pgAdmin III is not affected as it is clearly not dpi aware andtherefore scaled by Windows. This leads to blurred text and icons but at least it’s big enough to be legible. </span><pclass="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">Viktor</span></div>
Hi On Sun, Oct 2, 2016 at 11:43 PM, <viktor@troja.ch> wrote: > Hi list, hi Dave, > > On Windows 10 using a high res screen with high dpi scaling turned on and > set to 200%, the text in the pgAdmin 4 (standalone) interface becomes almost > illegible. > > The issue seems to be that pgAdmin claims to Windows that is high dpi aware > when it actually isn’t. See http://doc.qt.io/qt-5/highdpi.html for more info > about how QT deals with high dpi issues. I think it's more subtle than that. Most of the dev team run Macs, and high dpi support seems to work fine for us. We have had some issues reported - but on my retina MBP for example, pgAdmin displays nicely at all scaling levels. > The short term solution would be to make the app dpi unaware, thus letting > Windows take care of the scaling. Have you tried setting QT_AUTO_SCREEN_SCALE_FACTOR? Does it make a difference on Windows? > > Here an extract of the page above that seems relevant here: > > > > ---snip--- > > In order to get an application designed for low DPI values running on a high > resolution monitors quickly, consider one of the scaling options (let the > application run as DPI Unaware on Windows or set the environment variable > QT_AUTO_SCREEN_SCALE_FACTOR to "1". These options may incur some scaling or > painting artifacts, though. > > > > In the longer term, the application should be adapted to run unmodified: > > - Always use the qreal versions of the QPainter drawing API. > > - Size windows and dialogs in relation to the screen size. > > - Replace hard-coded sizes in layouts and drawing code by values > calculated from font metrics or screen size > > ---snip--- > > > > pgAdmin III is not affected as it is clearly not dpi aware and therefore > scaled by Windows. This leads to blurred text and icons but at least it’s > big enough to be legible. > > > > Viktor -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 3, 2016 at 11:01 AM, Dave Page <span dir="ltr"><<ahref="mailto:dpage@pgadmin.org" target="_blank">dpage@pgadmin.org</a>></span> wrote:<br /><blockquoteclass="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br/><span class="gmail-"><br /> On Sun, Oct 2, 2016 at 11:43 PM, <<a href="mailto:viktor@troja.ch">viktor@troja.ch</a>>wrote:<br /> > Hi list, hi Dave,<br /> ><br /> > On Windows10 using a high res screen with high dpi scaling turned on and<br /> > set to 200%, the text in the pgAdmin 4 (standalone)interface becomes almost<br /> > illegible.<br /> ><br /> > The issue seems to be that pgAdmin claimsto Windows that is high dpi aware<br /> > when it actually isn’t. See <a href="http://doc.qt.io/qt-5/highdpi.html"rel="noreferrer" target="_blank">http://doc.qt.io/qt-5/highdpi.<wbr />html</a> formore info<br /> > about how QT deals with high dpi issues.<br /><br /></span>I think it's more subtle than that. Mostof the dev team run Macs, and<br /> high dpi support seems to work fine for us. We have had some issues<br /> reported- but on my retina MBP for example, pgAdmin displays nicely<br /> at all scaling levels.<br /><span class="gmail-"><br/> > The short term solution would be to make the app dpi unaware, thus letting<br /> > Windows takecare of the scaling.<br /><br /></span>Have you tried setting QT_AUTO_SCREEN_SCALE_FACTOR? Does it make a<br /> differenceon Windows?<br /><div class="gmail-HOEnZb"><div class="gmail-h5"><br /></div></div></blockquote></div><br /></div><divclass="gmail_extra">I can confirm that setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR=1, or 0 forthat matter, makes no difference. <br /><br /></div><div class="gmail_extra">I even tried setting the following parametersin your qt.conf: <br /><br />[Platforms]<br />WindowsArguments = dpiawareness=0 (and 1, and 2)<br /><br /></div><divclass="gmail_extra">without any effect. <br /><br /><br /></div><div class="gmail_extra"><br /><br /></div></div>
On Mon, Oct 3, 2016 at 11:33 AM, Viktor Trojanovic <viktor@troja.ch> wrote: > On Mon, Oct 3, 2016 at 11:01 AM, Dave Page <dpage@pgadmin.org> wrote: >> >> Hi >> >> On Sun, Oct 2, 2016 at 11:43 PM, <viktor@troja.ch> wrote: >> > Hi list, hi Dave, >> > >> > On Windows 10 using a high res screen with high dpi scaling turned on >> > and >> > set to 200%, the text in the pgAdmin 4 (standalone) interface becomes >> > almost >> > illegible. >> > >> > The issue seems to be that pgAdmin claims to Windows that is high dpi >> > aware >> > when it actually isn’t. See http://doc.qt.io/qt-5/highdpi.html for more >> > info >> > about how QT deals with high dpi issues. >> >> I think it's more subtle than that. Most of the dev team run Macs, and >> high dpi support seems to work fine for us. We have had some issues >> reported - but on my retina MBP for example, pgAdmin displays nicely >> at all scaling levels. >> >> > The short term solution would be to make the app dpi unaware, thus >> > letting >> > Windows take care of the scaling. >> >> Have you tried setting QT_AUTO_SCREEN_SCALE_FACTOR? Does it make a >> difference on Windows? >> > > I can confirm that setting the environment variable > QT_AUTO_SCREEN_SCALE_FACTOR=1, or 0 for that matter, makes no difference. > > I even tried setting the following parameters in your qt.conf: > > [Platforms] > WindowsArguments = dpiawareness=0 (and 1, and 2) > > without any effect. :-(. OK, thanks - I've added this thread to https://redmine.postgresql.org/issues/1564 where we're tracking issues related to this. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Mon, Oct 3, 2016 at 12:32 PM, Dave Page <dpage@pgadmin.org> wrote: > On Mon, Oct 3, 2016 at 11:33 AM, Viktor Trojanovic <viktor@troja.ch> wrote: >> On Mon, Oct 3, 2016 at 11:01 AM, Dave Page <dpage@pgadmin.org> wrote: >>> >>> Hi >>> >>> On Sun, Oct 2, 2016 at 11:43 PM, <viktor@troja.ch> wrote: >>> > Hi list, hi Dave, >>> > >>> > On Windows 10 using a high res screen with high dpi scaling turned on >>> > and >>> > set to 200%, the text in the pgAdmin 4 (standalone) interface becomes >>> > almost >>> > illegible. >>> > >>> > The issue seems to be that pgAdmin claims to Windows that is high dpi >>> > aware >>> > when it actually isn’t. See http://doc.qt.io/qt-5/highdpi.html for more >>> > info >>> > about how QT deals with high dpi issues. >>> >>> I think it's more subtle than that. Most of the dev team run Macs, and >>> high dpi support seems to work fine for us. We have had some issues >>> reported - but on my retina MBP for example, pgAdmin displays nicely >>> at all scaling levels. >>> >>> > The short term solution would be to make the app dpi unaware, thus >>> > letting >>> > Windows take care of the scaling. >>> >>> Have you tried setting QT_AUTO_SCREEN_SCALE_FACTOR? Does it make a >>> difference on Windows? >>> >> >> I can confirm that setting the environment variable >> QT_AUTO_SCREEN_SCALE_FACTOR=1, or 0 for that matter, makes no difference. >> >> I even tried setting the following parameters in your qt.conf: >> >> [Platforms] >> WindowsArguments = dpiawareness=0 (and 1, and 2) >> >> without any effect. > > :-(. OK, thanks - I've added this thread to > https://redmine.postgresql.org/issues/1564 where we're tracking issues > related to this. I just figured out how to reproduce this on Windows - it seems like VMware was confusing matters, but I can see the problem now. I'll update the ticket. BTW; whilst it won't affect the runtime titlebar etc. are you aware you can use Ctrl+ (depending on your keyboard, you may need to hit Shift as well to get Ctrl+ rather than Ctrl=) and Ctrl- to zoom the display? That will allow you to get it to a usable size. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Mon, Oct 3, 2016 at 1:44 PM, Dave Page <dpage@pgadmin.org> wrote:
I just figured out how to reproduce this on Windows - it seems likeOn Mon, Oct 3, 2016 at 12:32 PM, Dave Page <dpage@pgadmin.org> wrote:
> On Mon, Oct 3, 2016 at 11:33 AM, Viktor Trojanovic <viktor@troja.ch> wrote:
>> On Mon, Oct 3, 2016 at 11:01 AM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Hi
>>>
>>> On Sun, Oct 2, 2016 at 11:43 PM, <viktor@troja.ch> wrote:
>>> > Hi list, hi Dave,
>>> >
>>> > On Windows 10 using a high res screen with high dpi scaling turned on
>>> > and
>>> > set to 200%, the text in the pgAdmin 4 (standalone) interface becomes
>>> > almost
>>> > illegible.
>>> >
>>> > The issue seems to be that pgAdmin claims to Windows that is high dpi
>>> > aware
>>> > when it actually isn’t. See http://doc.qt.io/qt-5/highdpi.html for more
>>> > info
>>> > about how QT deals with high dpi issues.
>>>
>>> I think it's more subtle than that. Most of the dev team run Macs, and
>>> high dpi support seems to work fine for us. We have had some issues
>>> reported - but on my retina MBP for example, pgAdmin displays nicely
>>> at all scaling levels.
>>>
>>> > The short term solution would be to make the app dpi unaware, thus
>>> > letting
>>> > Windows take care of the scaling.
>>>
>>> Have you tried setting QT_AUTO_SCREEN_SCALE_FACTOR? Does it make a
>>> difference on Windows?
>>>
>>
>> I can confirm that setting the environment variable
>> QT_AUTO_SCREEN_SCALE_FACTOR=1, or 0 for that matter, makes no difference.
>>
>> I even tried setting the following parameters in your qt.conf:
>>
>> [Platforms]
>> WindowsArguments = dpiawareness=0 (and 1, and 2)
>>
>> without any effect.
>
> :-(. OK, thanks - I've added this thread to
> https://redmine.postgresql.org/issues/1564 where we're tracking issues
> related to this.
VMware was confusing matters, but I can see the problem now. I'll
update the ticket.
BTW; whilst it won't affect the runtime titlebar etc. are you aware
you can use Ctrl+ (depending on your keyboard, you may need to hit
Shift as well to get Ctrl+ rather than Ctrl=) and Ctrl- to zoom the
display? That will allow you to get it to a usable size.
Hi Dave,
Sorry for the late reply.
No, I wasn't aware of this. I was trying to do this using the scrollwheel on my mouse while pressing the CTRL-Key, without success. But just using the key combo CTRL-+ works perfectly, it basically solves my problem. Thanks for the hint!
Viktor