Finding a way to change the titlebar font has been infuriatingly frustrating. It should be in the WM settings but it's not, and I can't find which KDE app I need to install. It doesn't help that the default font is only good for Breeze and nothing else. Reproducible: Always
KWin simply uses "QFontDatabase::systemFont(QFontDatabase::TitleFont)" - it's the desktop environments job to configure that.
This really doesn't make what I'm saying invalid. WM settings should present a way to configure it.
How should we know to configure that under - KDE 1/2/3/4/5 - GNOME 1/2/3 - LXDE - XFCE - FOOBARDESKTOP - no environment hinted at all It's entirely out of scope trying to provide access to 3rd party configuration. What about system colors? Maybe kwin should allow you to configure the resolution? And multiscreen setup should be definitively there as well, shouldn't? And a wallpaper? How about mouse and keyboard configuration? ... KWin is a window manager and no complete desktop environment system. The tool that interlinks various config modules (with search capability) exists and is called (on KDE) *drummroll* "System Settings" - binary name is "systemsettings5" (of course it's font configuration will be without any effect on GNOME - and likely on lxqt as well, depends on the Qt platform plugins) Leaving that aside, decos are of course free to ignore the font provided by the system and use whatever override they feel like.
FFS, I'm not telling you to implement a full blown DE, I'm telling you to let the user change QFontDatabase::TitleFont from the WM settings, which is *exactly* where they'll expect to be able to change it. This is some serious damn hostility over here.
And I told you that we have simply no idea how to do that. We -indirectly- gain the font from the Qt platform plugins. That doesn't mean we could (or actually should) write it. The platforms configure this font and, via their plugins, tell Qt about it. You may ask Qt to alter the platform design to permit for random writing back from Qt client code, but I'm not sure that would be approved. So the alternative would be to have knowledge about to how to run the various config modules for the current platform, ie. kwin spawns the systemsettings (modules?) from gnome, lxqt, ... - iff we can detect a known platform - is that seriously what you want? A button in the kwin config module that runs the lxqt settings application?
> is that seriously what you want? Evidently not. But what's preventing you from setting it at the KDE platform level?
Afaiu you're using LxQt, right? => Adjusting the KDE configuration (or even just linking in the fonts kcm) has zero impact on your platform (ok: "unless you export QT_QPA_PLATFORMTHEME to load the kde platform plugin instead of the lxqt one" - the provided setting would however still fail on other environments then) We'd have to add a custom internal font config and (default to, but ultimately) ignore the platform settings - what crosses the entire Qt platform idea (and technically breaks the fonts kcm, since adjusting the font there has no more an impact on kwin) and takes kwin out of sync with other clients making use of this particualr font (eg. MDI window titlebars, maybe even browsers etc...) And that wouldn't likely stop with the font family, would it? You'd likely also want to customize the titlebar (font) colors, yesno? In general, fonts, colors etc. aren't configured "per client" (with maybe browsers as semi-nested-environment being an exception), but "per environment" - so all applications can use the same fonts (well, Qt integrates - gtk maybe not so much) and colors. KWin is no exception here, just because it's a prominent (but not necessarily the only) user of the titlebar font (leaving aside that configuring "comic sans" may clash with the general "Rotis" setup visually ;-)
I looked into it further and I'm starting to understand why the decoration font is problematic. I don't think it should be QFontDatabase::TitleFont at all. Maybe default to it, but... yeah, there most likely should be a local override for it. > And that wouldn't likely stop with the font family, would it? > You'd likely also want to customize the titlebar (font) colors, yesno? Well, I don't personally care about colors, but I know what you mean. Maybe decoration themes should ship their own font override in their own settings. Would that be reasonable from a technical POV?
general comment: "KWin is not a standalone window manager (c.f. openbox) and does not provide any functionality belonging to a Desktop Shell." from https://community.kde.org/KWin/Mission_Statement Adding font configuration etc. doesn't belong into KWin. That needs to be provided by the desktop environment KWin is used with. As KWin happily works with any Qt Platform Theme this should be easy to provide. Now to the latest comment: > Maybe decoration themes should ship their own font override in their own settings. Would that be reasonable from a technical POV? Yes from a technical point of view that's possible. In fact KWin doesn't care about the rendering, this is all up to the decorations. The font provided by KDecoration API is documented with "recommended font" - which implies it's up to the decoration whether it wants to use it or provide a custom overwrite.
Martin, I thought about this a bit more while working on bug 351122 and I'm now reasonably convinced QFontDatabase::TitleFont is not an appropriate default pick. My thought is now that there should be a DefaultTitleFont key of sorts in aurorae settings which can be configured in the decoration settings. This solves the original issue, provides themes more control over how they look and still give the user the final say in the font.
concerning Aurorae: it could be added to the metadata file - I wouldn't mind an addition to that.
Technical problems aside, since kwin works well outside KDE too, it's logical to expect a separate titlebar font setting for it.
Am 23. Oktober 2016 21:00:20 MESZ, schrieb Tsu Jan via KDE Bugzilla <bugzilla_noreply@kde.org>: >https://bugs.kde.org/show_bug.cgi?id=351116 > >Tsu Jan <tsujan2000@gmail.com> changed: > > What |Removed |Added >---------------------------------------------------------------------------- > CC| |tsujan2000@gmail.com > >--- Comment #12 from Tsu Jan <tsujan2000@gmail.com> --- >Technical problems aside, since kwin works well outside KDE too, it's >logical >to expect a separate titlebar font setting for it. Please note that the setting modules KWin provides are technically Plasma specific. In fact other desktops would need to provide a different way to configure KWin without requiring kcmshell5. So overall that's really outside the scope of KWin
@Martin Gräßlin I understand your reasoning. It was why I said "Technical problems aside,..."; just wanted to show the problem from another perspective.