Bug 358254 - Setting the toolbar font does nothing
Summary: Setting the toolbar font does nothing
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (show other bugs)
Version: 5.4.3
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 384946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-20 14:30 UTC by Jani-Matti Hätinen
Modified: 2017-11-29 22:19 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jani-Matti Hätinen 2016-01-20 14:30:52 UTC
KDE/Qt 5 applications no longer follow the toolbar font setting (toolBarFont in kdeglobals). Instead the font used in toolbars is set by the General font setting (font in kdeglobals).


Reproducible: Always

Steps to Reproduce:
1. Set a different font/size in General and Toolbar font in systemsettings or .config/kdeglobals


Actual Results:  
Toolbar fonts follow the General font setting

Expected Results:  
Toolbar fonts should follow the Toolbar font setting
Comment 1 Jani-Matti Hätinen 2016-07-01 11:58:29 UTC
Still broken in QT 5.6.1, Frameworks 5.23.0, Plasma 5.6.5 and Applications 16.04.2
Comment 2 intruderkw 2017-07-03 13:10:09 UTC
Broken like it alwas was. Pretty depressing.
Comment 3 Allan Sandfeld 2017-07-13 21:32:49 UTC
Try latest 5.9 branch, see https://codereview.qt-project.org/#/c/195176/

Though I thought the kde platform module already handled the same setting
Comment 4 null 2017-08-19 21:41:34 UTC
Allan: I'm working on a similar fix in https://phabricator.kde.org/D6697 (while I included the bug number, somehow I missed your comment until now as it only appeared shortly before I submitted my review – sorry for that).

However, it seems I cannot get your fix to Qt working locally. I tried Plasma (Breeze), IceWM (Fusion) and XFCE (Adwaita), all with Qt 5.9.1 on Tumbleweed which should include your patch according to gerrit. For testing I created a MainWindow with a toolbar in Qt Designer. Only with Plasma the MainWindow picked up KDE's settings: Menubar as specified in kdeglobals, but Toolbar got general font.

I also tested with Qt 5.6.2, which should not include your patch. We get the same behaviour as above (only Plasma was tested). This means your patch seems to change nothing for me. Apparently KDE's settings are picked up only in Plasma, and then the Plasma QPA takes over which is not based on the unix platformtheme. Could you share how to reproduce your fix properly? (I might have missed something). Let me know if we should continue this discussion in gerrit.

Even though I might commit my patch to Plasma (which works on both 5.6.2 and 5.9.1, so not dependant on your Qt patch) shortly, I'd be interested to understand your Qt patch properly, as I'll maybe look into the "Toolbar vs Toolbutton" issue in the next weeks.
Comment 5 Allan Sandfeld 2017-08-20 00:04:00 UTC
Note my Qt change was in Qt's KDE platformplugin. If you have a full KDE/Plasma installation, the vanilla platform-integrations gets overriden by the Plasma's own platformplugin. So similar code might already be there in that plugin it the code might need to be duplicated.
Comment 6 null 2017-08-20 14:25:19 UTC
Git commit 86be8d49d8988fb6c35e847ed9e0aad3e8514208 by Henrik Fehlauer.
Committed on 20/08/2017 at 14:16.
Pushed by rkflx into branch 'master'.

Allow to change toolbar font separately again

Summary:
The fonts KCM supports changing the toolbar font, but with the port to
QPA/Plasma 5 in aa16577f this stopped working and toolbars just used the
general font. This is fixed by setting QPlatformTheme's ToolButtonFont
to the toolbar font chosen. However, there are some caveats:

Default toolbar font size is 9, while the general font size is 10.
This would result in a sudden shrink in toolbar widths everywhere (or
worse for weird leftover settings users might have tried unsuccessfully).

In some places QToolButtons are used outside of toolbars, sometimes
right next to QPushButtons. As due to the bug both had the same font,
this might now lead to unexpected differences.

Therefore, to keep visual consistency with past Plasma 5 releases, let's
change the default toolbar font size to 10 and provide a kconf_update
script to copy the general font to the toolbar font once.
FIXED-IN: 5.11.0

Test Plan:
make install, run kconf_update: toolBarFont in kdeglobals gets updated
immediately

Change "Toolbar" font in "kcmshell5 fonts", start your favorite KDE
and Qt-only applications: toolbar font and/or font size changed
accordingly

Reviewers: #plasma, davidedmundson, fvogt

Reviewed By: #plasma, davidedmundson, fvogt

Subscribers: fvogt, davidedmundson, jensreuterberg, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6697

M  +1    -1    src/platformtheme/CMakeLists.txt
A  +9    -0    src/platformtheme/fonts_global_toolbar.upd
M  +2    -1    src/platformtheme/kdeplatformtheme.cpp
M  +1    -1    src/platformtheme/kfontsettingsdata.cpp

https://commits.kde.org/plasma-integration/86be8d49d8988fb6c35e847ed9e0aad3e8514208
Comment 7 Christoph Feck 2017-09-23 04:13:53 UTC
*** Bug 384946 has been marked as a duplicate of this bug. ***
Comment 8 RJVB 2017-11-29 22:19:29 UTC
Git commit 9dbb9fad5a5c0667f187b132a6d69e94f3f77a51 by R.J.V. Bertin.
Committed on 29/11/2017 at 22:11.
Pushed by rjvbb into branch 'qt590'.

Ignore the default stylename hint on Mac and
Allow to change toolbar font separately again

Summary:
The fonts KCM supports changing the toolbar font, but with the port to
QPA/Plasma 5 in aa16577f this stopped working and toolbars just used the
general font. This is fixed by setting QPlatformTheme's ToolButtonFont
to the toolbar font chosen. However, there are some caveats:

Default toolbar font size is 9, while the general font size is 10.
This would result in a sudden shrink in toolbar widths everywhere (or
worse for weird leftover settings users might have tried unsuccessfully).

In some places QToolButtons are used outside of toolbars, sometimes
right next to QPushButtons. As due to the bug both had the same font,
this might now lead to unexpected differences.

Therefore, to keep visual consistency with past Plasma 5 releases, let's
change the default toolbar font size to 10 and provide a kconf_update
script to copy the general font to the toolbar font once.
FIXED-IN: 5.11.0

Test Plan:
make install, run kconf_update: toolBarFont in kdeglobals gets updated
immediately

Change "Toolbar" font in "kcmshell5 fonts", start your favorite KDE
and Qt-only applications: toolbar font and/or font size changed
accordingly

Reviewers: #plasma, davidedmundson, fvogt

Reviewed By: #plasma, davidedmundson, fvogt

Subscribers: fvogt, davidedmundson, jensreuterberg, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6697
Cherry: picked from plasma-integration:86be8d49d8988fb6c35e847ed9e0aad3e8514208
Committed from host : Portia.local

M  +2    -1    src/platformtheme/kdeplatformtheme.cpp
M  +2    -1    src/platformtheme/kfontsettingsdatamac.mm
M  +1    -0    src/platformtheme/plintegration-cumpatch1.diff

https://commits.kde.org/osx-integration/9dbb9fad5a5c0667f187b132a6d69e94f3f77a51