From: Timothy R. <tr...@si...> - 2013-10-03 23:24:02
|
That seems to do it. I'll do some additional testing tomorrow on my third machine, but, it all seems to work. On Oct 3, 2013, at 3:03 PM, Fabien Chéreau <fab...@gm...> wrote: > Mmm, I was hoping the code I added in StelApp::update() would do it, but apparently it's not enough. Could you please try again? > Fabien > > > On Thu, Oct 3, 2013 at 1:39 AM, Reaves, Timothy <tr...@si...> wrote: > I notice you removed the code I had added that detected when the screen has changed; without that, how do you expect the new pixel ratio to be picked up and used, when moving from screen-to-screen? > > > On Wed, Oct 2, 2013 at 7:31 PM, Timothy Reaves <tr...@si...> wrote: > Unfortunately, it's now worse. It behaves the same when Retina is the primary display; it shows > fine, but, moving to non-Retina shows at 200% (it's not re-scaled). However,when non-Retina is the primary, the app starts, but no UI is displayed (this was the same behavior before I added code to resize the screen at start). > > On Oct 2, 2013, at 3:14 PM, Fabien Chéreau <fab...@gm...> wrote: > >> Hi Tim, thanks for the feedback, could you please try again? >> Fabien >> >> >> >> On Wed, Oct 2, 2013 at 2:38 PM, Reaves, Timothy <tr...@si...> wrote: >> The code in trunk works correctly under every tested scenario. >> >> When the Retina screen is the primary screen, the app does start correctly. When moved to a non-Retina screen, it is now 200% too large. >> >> In looking at your changes, you also removed the code I had that detected screen changes of the apps position; I think if you re-create that, with the manor you are scaling, it may work fine. >> >> >> On Wed, Oct 2, 2013 at 4:33 AM, Fabien Chéreau <fab...@gm...> wrote: >> I see, is this use-case working with the current trunk code? I.e. is it managing moving from 1 screen to another right? Also, could you please tell me what happens with the GUI fonts (like the button labels), are they twice smaller after you move the app from one screen to the next? >> >> For the openGL canvas, the solution may be to re-detect screen density each time the windows is resized. >> >> Fabien >> >> >> >> On Wed, Oct 2, 2013 at 2:07 AM, Reaves, Timothy <tr...@si...> wrote: >> No, it does not work. When the screen is moved from a non-HIDPI to a HIDPI, the glWidget only consumes 25% of the screen. I will try to tomorrow morning on opening to a HIDPI instead of moving to one. >> >> >> On Tue, Oct 1, 2013 at 6:33 PM, Fabien Chéreau <fab...@gm...> wrote: >> Tim, could you try the deviceindependentfont branch? >> Thanks, >> Fabien >> >> >> On Tue, Oct 1, 2013 at 8:44 PM, Reaves, Timothy <tr...@si...> wrote: >> That's fine. >> >> I had tried (although very possibly incorrectly) to do as you say and use @2x at init time, but, it didn't work. I'll try your code once pushed, and see what happens. >> >> As for point/pixel, the Qt docs explicitly state that when using pixel instead of point, they are then device-dependent. But it's really not worth arguing about. >> >> >> >> >> On Tue, Oct 1, 2013 at 2:05 PM, Fabien Chéreau <fab...@gm...> wrote: >> Hi Tim, >> From http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/ it seems that when Info.Plist contains the necessary options, most of Qt code doesn't need to be changed. >> <key>NSPrincipalClass</key> >> <string>NSApplication</string> >> <key>NSHighResolutionCapable</key> >> <string>True</string> >> Currently we have this already set (excepted that we have a "YES" instead of "true". I hope it's fine). >> >> With this settings, all QWidgets and Qml stuff should be properly scaled already. The only problem we have is for OpenGL rendering: for a retina screen OpenGL pixels are twice smaller than the device-independent pixels used by Qt. What still needs to be done then is the following: >> >> - the OpenGL viewport need to be 2x larger. It's what you did although I think a cleaner implementation should not touch the internals of the StelProjector class. It's enough to apply x2 factor at init time. >> - text rendered directly in openGL, using StelPainter::drawText. For this it should be enough to set the proper pixelRatio to the QOpenGLPaintDevice used locally in this function. The ratio can be obtained in the method simply using QOpenGLContext::currentContext().screen().devicePixelRatio(). >> >> And most importantly, I don't really like the fact that we move to Point size instead of pixel size because it's not backward compatible (a user with an existing config.ini will get large fonts), and also because usually devices with higher screen density use smaller font size (in point) because we stay closer to the screen, the opposite also applies to large screens like a TV. In Qt they created the notion of "Device-Independent Pixel" for this reason. >> >> If it's OK with you, I will do some cleanup in the code and revert the commit where all setPixelSize are converted to setPointSize. The pixels will really be "Device-Independent Pixel", which means that the behavior should be fine on mac retina as well. >> Fabien >> >> >> On Sat, Sep 28, 2013 at 3:23 AM, Reaves, Timothy <tr...@si...> wrote: >> On Linux, the fonts aren't huge; they are 13 point. As-in the same size as 13 point fonts in other applications. And the code now shows fonts the same relative size on all devices, instead of device-dependent pixels. So I'm not sure what you mean by 'pretty broken'. If you mean that you would prefer the fonts to be smaller than 13 point, I understand that; but a better solution is still to specify them in device-independent points instead of device-dependent pixels. >> >> If on the other had you mean the changes to the StelProjector & StelProjectorParams, my code was an attempt to fix what was broken by your merge to trunk. Where I had pointed out twice that your branch was - well, broken. So, again, an attempt to fix what is already broken on trunk makes perfect sense to perform on trunk. >> >> But thanks for finally noticing. >> >> >> On Fri, Sep 27, 2013 at 3:09 PM, Fabien Chéreau <fab...@gm...> wrote: >> It's also pretty broken here (huge fonts). I'll try to have a look this WE. In general I think this kind of changes should be done first in a branch so that we can merge only working code (this kind of device-dependent stuff is hard to get right). Fabien >> >> >> On Fri, Sep 27, 2013 at 7:47 PM, Reaves, Timothy <tr...@si...> wrote: >> Corrected. >> >> >> On Fri, Sep 27, 2013 at 1:23 PM, Alexander Wolf <ale...@gm...> wrote: >> Hi, >> >> 2013/9/27 Reaves, Timothy <tr...@si...> >> >> This is working on my machine, in all scenarios (it has one Retina & one non- screen). >> Please let me know of any issues, or feel free to do something different. >> >> I'm checked it on linux and found wrong size of display. >> >> -- >> With best regards, Alexander >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk_______________________________________________ >> >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk > _______________________________________________ > Stellarium-pubdevel mailing list > Ste...@li... > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk_______________________________________________ > Stellarium-pubdevel mailing list > Ste...@li... > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel |