Code Monkey home page Code Monkey logo

Comments (23)

dakcarto avatar dakcarto commented on June 28, 2024

Hi @nextstopsun, thanks for bringing this up. You can try the following:

  1. Edit /usr/local/opt/qgis3-dev/QGIS.app/Contents/Info.plist
  2. Change NSHighResolutionCapable key to True, then save Info.plist
  3. Run touch /usr/local/opt/qgis3-dev/QGIS.app to ensure launch services is notified of plist change

Looks like the qgis3-dev formula needs updated here, since it sets that key to False.

Note: I don't see any major changes here when I do that (this is a good thing). Also, the low resolution icon is due to a missing high-res one for Mac, not due to incompatible NSHighResolutionCapable settings.

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

If you change NSHighResolutionCapable as noted above, the Finder's Info dialog for the QGIS.app will now display the "Open in Low Resolution" checkbox, which should be unchecked by default.

from homebrew-qgisdev.

nextstopsun avatar nextstopsun commented on June 28, 2024

@dakcarto Thanks. I'll try that. I'm mostly interested in getting map canvas display in HiDPI.
BTW, are missing menu icons related to this one, or it's a separate issue?

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

BTW, are missing menu icons related to this one, or it's a separate issue?

Separate issue, I think, possibly related to packaging and whether they are SVG or PNG. Haven't looked into it yet. Also here for me, the Options menu is replaced by the one from Processing. I'll work on fixing that upstream ASAP.

from homebrew-qgisdev.

nextstopsun avatar nextstopsun commented on June 28, 2024

According to window elements, qgis started in HiDPI mode, however map canvas seems to be in low res still. @dakcarto Are you getting this also?

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

According to window elements, qgis started in HiDPI mode, however map canvas seems to be in low res still. @dakcarto Are you getting this also?

Sorry, don't have any more time right now to test. It may be that something in code has to be changed to fully enable HiDPI.

from homebrew-qgisdev.

m-kuhn avatar m-kuhn commented on June 28, 2024

Can you try to insert the following code in src/gui/qgsmapcanvas.cpp at line 585 (after mSettings.setExpressionContext( expressionContext );

mSettings.setOutputDpi( logicalDpiX() );

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

If looking to edit QGIS source during a build of qgis3-dev, one will need to:

  1. Edit the formula and put a raise statement just prior to the run of cmake ...
  2. Build with brew install qgis3-dev -dv (or at least -d)
  3. When raise is thrown, drop into a debug shell, edit the file, then exit debug shell
  4. Choose to 'ignore' thrown raise, which will continue building

This is because any changes to ~/Library/Caches/Homebrew/qgis3-dev--git/* will probably be reset prior to building QGIS inside the formula.

...
==> Checking out branch master
git checkout -f master --
Already on 'master'
Your branch is behind 'origin/master' by 119 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
git reset --hard origin/master <-- !!!
...

Alternatively, @nextstopsun, you could use the dependencies to do your own build.

from homebrew-qgisdev.

nextstopsun avatar nextstopsun commented on June 28, 2024

@dakcarto I have all the deps installed, I think I'm going to setup QT Creator build. On a second thought, what if I just clone master and edit the formula to build from a local repo?

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

On a second thought, what if I just clone master and edit the formula to build from a local repo?

@nextstopsun that should work, though I recommend adding a revision 1 just under version "2.99" and then use brew upgrade -dv qgis3-dev, so you do not loose your current build. Later, you can just brew uninstall qgis3-dev to clear the most recent, edited build.

Qt Creator setup is better and will be added soon to the tutorial.

from homebrew-qgisdev.

m-kuhn avatar m-kuhn commented on June 28, 2024

If anyone can test this patch, that would be much appreciated.

qgis/QGIS#3847

from homebrew-qgisdev.

brncsk avatar brncsk commented on June 28, 2024

@m-kuhn No changes for me: UI chrome shows up in high res when NSHighResolutionCapable is set, but the map canvas is still rendering pixelated.

from homebrew-qgisdev.

m-kuhn avatar m-kuhn commented on June 28, 2024

@brncsk any chance you could find the value reported by logicalDpiX() - either with a debugger or temporarily add

qWarning() << "Logical DPI X " << logicalDpiX();

from homebrew-qgisdev.

brncsk avatar brncsk commented on June 28, 2024

from homebrew-qgisdev.

brncsk avatar brncsk commented on June 28, 2024

@m-kuhn:

logicalDpiX() reports 72.
physicalDpiX() reports 111, though, which yields a somewhat better, albeit still suboptimal result.

I also tried multiplying that by devicePixelRatio() == 2 but it still feels a bit rough.

from homebrew-qgisdev.

brncsk avatar brncsk commented on June 28, 2024

In fact, increasing the argument of setOutputDpi() only seems to increase outline width (given in millimeters) and label font size (given in pts) but does not help with the rendering problem itself.

Screenshots at different setOutputDpi() resolutions:

72 (logicalDpiX()):
72

111 (physicalDpiX()):
111

222 (physicalDpiX() * devicePixelRatio()):
222

444 (physicalDpiX() * devicePixelRatio() * 2):
444

from homebrew-qgisdev.

m-kuhn avatar m-kuhn commented on June 28, 2024

In fact, increasing the argument of setOutputDpi() only seems to increase outline width

Correct, that's exactly what needs to be done in the rendering engine - but each pixel of the screen should be used (I guess now there are 4 equal pixels sitting next to each other on your map).

There's an issue in Qt with QGraphicsView and HiDpi: https://bugreports.qt.io/browse/QTBUG-26795 but it looks like caching is not explicitly enabled and defaults to disabled and I don't think we use the GL version, so this shouldn't affect us.

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

Hi. Can someone retest the rendering issue with latest qgis3-dev, which now fully builds against Qt 5.8.0? See known issues in #22.

Fixed with Qt 5.8.0: SVG menu icons now show properly (sweet!).

Also, I have updated the dock and app switcher icon to 1024x1024.

from homebrew-qgisdev.

brncsk avatar brncsk commented on June 28, 2024

It does not seem to fix the rendering issue, output is still pixellated. The 1024x1024 icon is a nice touch, though!

from homebrew-qgisdev.

Malauch avatar Malauch commented on June 28, 2024

I just want to report, that problem with pixelated output on canvas is still here. In addition plugin description (in plugin manager window) is oversized.
zrzut ekranu 2017-11-08 o 09 46 26
zrzut ekranu 2017-11-08 o 09 04 48

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

Hi. I am closing this as it is an issue to be discussed on the main QGIS issue tracker:
https://issues.qgis.org

I believe I have done what can be via the Homebrew formula and something more needs addressed in the core codebase.

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

This is the only current issue of similar topic I could find:
https://issues.qgis.org/issues/15357

from homebrew-qgisdev.

dakcarto avatar dakcarto commented on June 28, 2024

I also created a saved query on the tracker for "Subjects with dpi":
https://issues.qgis.org/projects/qgis/issues?query_id=145

from homebrew-qgisdev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.