Zren / material-decoration

Material-ish window decoration theme for KWin, with LIM, based on zzag's original design.
GNU General Public License v2.0
197 stars 17 forks source link

LIM: Respect Menu Font Settings #31

Open QORTEC opened 3 years ago

QORTEC commented 3 years ago

Current behaviour: Currently LIM uses the Window title font settings

Expected behaviour: LIM should use the Menu font settings

Steps to Reproduce: Open KDE “System Settings” Under Appearance click on Fonts Change the font settings for Menu and Window title Click Apply

Screenshot_20210205_223433

Additional Information: System OS: Solus Plasma material-decoration: 65fe6f577a978a9e601241d29bea35185eb7f69c built & packaged solbuild package-material-decoration.yml

ben2talk commented 3 years ago

The actual (dropdown section) menu follows menu font. Menu items in the titlebar use titlebar font - actually this looks good to me.

QORTEC commented 3 years ago

@ben2talk thanks for pointing that out, don't know how I missed that. I mainly opened the bug report since the menu was not following the expected behaviour (to me anyways).

It could be argued that:

If the current behaviour is preferred/expected; I would like to know how feasible would it be to add a toggle between the two settings (Window title & Menu)?

Zren commented 3 years ago

I won't be adding an option, but you can modify it to do so.

It's probably easier to hardcode a QFont with the desired size + family.

hexclover commented 1 year ago

Hello, just to mention that I've implemented the option in my fork: https://github.com/hexclover/material-decoration. Feel free to test it out.

With the option ON:

image

With the option OFF:

image

QORTEC commented 1 year ago

@hexclover I just built and tested your Material-Decorations fork. After some quick testing it I noticed that the Use menu font when drawing menu items option uses the general font not the menu font. (I use the same font for both so I'm happy with it as is.)

System Information:
Operating System: Solus 4.3
Kernel Version: 5.15.50-216-zfs
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
QT Version: 5.15.5
Graphics Platform: X11

commit c089983 | hexclover fork

hexclover commented 1 year ago

@QORTEC Hello, what was your testing procedure? Can you try the following steps:

  1. In system settings, set General and Menu fonts to different fonts.
  2. Logout and login again. Or, at least restart KWin.
  3. Try toggling the option. Did it work?
QORTEC commented 1 year ago

@hexclover, it works! Kinda? There seems to be a bug, when you change a font the menu uses the general font. Restarting kwin resets the menu to use the menu font.

Steps to Reproduce:

  1. change any font whatsoever
  2. apply said change

Result: The menu uses the general font.

Expected Behaviour: The menu uses the menu font.

Workaround: Restart kwin, the menu will use the menu font.

hexclover commented 1 year ago

@QORTEC Yes, there seems to be a long-standing bug in KDE (?): If you change any (?) of the font settings and apply them, applications will start to use the General font for menus until restart. I don't think this is related/specific to material-decoration.