[Interest] Qt5 and "global" configuration

Stanislav Baiduzhyi sbaiduzh at redhat.com
Fri Nov 14 12:41:08 CET 2014


On Thursday 13 November 2014 14:59:19 Thiago Macieira wrote:
> > Which means that we should not use Qt5 apps on less supported desktop
> > environments and we should not use Qt5 apps launched under another user
> > with empty home folder?
> No, it means Qt 5 needs to support those desktops too, as much as possible.
> Note that all the Qt-based desktops should provide the theme plugin by
> themselves.

That's true, but not all of them do, and obviously some of them are so 
unpopular that effort of supporting them in Qt may be not worth trying, which 
leaves the users of those desktops with Qt4 but not with Qt5.

> As for an empty $HOME, it means no desktop, so the Fusion style is just
> fine.

Well, I'm not worried too much about the looks, I'm worried more about proper 
font sizes, as we're entering the age when 96dpi becomes less and less common.

> > 2. Read 'dpi' config value from fontconfig.
> Disagreed. The DPI value comes from the windowing system, not from
> fontconfig.

There are multiple issues with that. I'm talking about X right now:

- when you're using some brand new laptop your physical screen dimension may 
not be present in X db yet, which means that X just takes your screen 
resolution, assumes 96dpi and calculates physical dimensions based on that, 
which usually gives you result very far from expected. Yes logical thing would 
be to report that as issue into X and wait until it will be added/resolved, 
then ported to your distribution, which in case of enterprise or just stable 
distributions will never happen. Fontconfig, on the other hand, does not have 
any defaults (or should not), which means that if you got the value from 
fontconfig - that value is configured by user, who usually knows better, and 
that value should override values reported by X.

- when using Xinerama with largely different screens, like 13" laptop + 27" 
external monitor, again reported DPI is very far away from both of those 
devices, in which case user has to experiment which value will result in more-
or-less readable text on both devices.

So I'm not suggestion to support only fontconfig, but allow fontconfig to 
override the values reported by windowing system.

> > 3. Propose (or use if already exists) some XDG variable or something like
> > that to determine if desktop is black-on-white or white-on-black, and add
> > support for those 2 basic setups.
> You're proposing an XDG widget style/theme configuration. It's required, but
> it won't happen. Moreover, I don't think it can happen, since the style is
> more than the colours and font sizes. It's also about what the widgets look
> like and how they behave. Those aren't configuration files, they are
> *code*.
> 
> It gets worse with Wayland because now applications need to draw the window
> decorations too. Unless ALL the toolkits have each a plugin for the same
> themes, the window decorations will look different.

Yes, I understand the issue, and I understand that there is no really good way 
of solving that. But I think that some very simple mechanism would suffice, 
just to know if the desktop theme is black-on-white or white-on-black, and 
have 2 default Fusion styles based on that. Nothing fancy, just don't stand 
out too much.

> > That's all that needed to make Qt5 look bearable on
> > unconfigured/unsupported desktop.
> Unconfigured is out of scope. Unsupported is solved by making it supported.

Well, unless pt and dpi size will be discovered somehow (from fontconfig?) 
then I agree, otherwise creating test user and launching Qt apps will be quite 
wasteful (because of need to configure some kind of desktop before being able 
to sudo something from that user), while with Qt4 it is possible to launch 
qtconfig and set proper font family.

-- 
     Regards,
        Stas



More information about the Interest mailing list