Code Monkey home page Code Monkey logo

Comments (9)

julientaq avatar julientaq commented on May 18, 2024 1

I got a linux mint cinnamon 18.2 running with a 3k display, and i'd be happy to test any update of the app.

from notes.

nuttyartist avatar nuttyartist commented on May 18, 2024 1

@julientaq That's great, we will contact you when we'll work on this for our future release. Thanks 👍

from notes.

alex-spataru avatar alex-spataru commented on May 18, 2024

As you already mentioned, Qt 5.6 onwards supports high DPI screens. However, not everyone will have Qt 5.6 installed (especially Linux users). Here is the code that I use to obtain the scale factor of the screen:

    /* Avoid UI scaling issues with Qt 5.6 */
#if QT_VERSION >= QT_VERSION_CHECK (5, 6, 0)
#if defined Q_OS_MAC
    QApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
#else
    QApplication::setAttribute (Qt::AA_DisableHighDpiScaling);
#endif
#endif

    /* Calculate the scale factor of the screen */
    qreal ratio = (qApp->primaryScreen()->physicalDotsPerInch() / 100) * 0.9;

    /* Scale factor is too small */
    if (ratio < 1.2)
        ratio = 1;

    /* Mac already scales things */
#if defined Q_OS_MAC
    ratio = 1;
#endif

This code will output 1 for normal density screens. On higher-density screens it will output the most appropriate value. The downside of this approach is that you need to manually multiply every pixel/UI related value by this obtained factor (which should be set as a static global variable).

I hope that this can help you!

from notes.

nuttyartist avatar nuttyartist commented on May 18, 2024

@alex-spataru does Qt 5.6 onwards support high DPI screens out-of-the-box?
Does someone has high screen display to test?

from notes.

xlucn avatar xlucn commented on May 18, 2024

I am not sure if it is the right place, currently the layout has issue when set Xft.dpi to larger values (than 96, 144 in screenshot) in Xresources on Linux:
Screenshot_2021-03-15_23-54-06
If I set qt scaling globally with QT_SCALE_FACTOR=2 it works well, while Xft.dpi only changes font size I think.

from notes.

bjorn avatar bjorn commented on May 18, 2024

@OliverLew Yeah, this issue was also reported at #164 when larger fonts are used on Windows. The widget or delegate used there should probably calculate its size depending on the font size, whereas it currently appears to have a fixed height.

from notes.

nuttyartist avatar nuttyartist commented on May 18, 2024

@bjorn Exactly! That (plus upgrading the icons to suit bigger resolutions) would be the main objective of this issue.

from notes.

Darthagnon avatar Darthagnon commented on May 18, 2024

Guess it's the same bug, but I've noticed a lot of cut-off or strangely placed icons, as well as a glitch in the secondary settings dropdown (on right) (primary settings dropdown on left is ok)

Notes_bGu2FMTr0G

from notes.

nuttyartist avatar nuttyartist commented on May 18, 2024

First of all, I see you're using the Qt5 version, is that intentional? If so, why?

Second, I'm curious if in Kanban mode (which is supoprted in Qt 6+) you'll also have scaling issues. So if you could report back I'd appreciate it.

Theird, I think I understand why the Glitch with the Edtior Settings happen (Although I'll need to investigate more). Can you please open a new issue for that?

The rest, is probably an issue with scaling. Can you test to see what happens if you change your scaling in your OS settings? People that had this problem told me it fixed the issue. But of course we still need to find a way to make it work right out of the box. That's why I'm curious if there's also a scaling issue in the Kanban view - sicne it's written in QML and we're planning to migrate our entire UI to QML

from notes.

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.