! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
gtk3 panel-plugins do not respect gtk.css font-weight correctly
Status:
RESOLVED: INVALID
Product:
Xfce4-panel
Component:
Libxfce4panel

Comments

Description Max Zhao 2017-02-27 00:38:25 CET
Font weight is wrongly applied to gtk3 panel plugin context menues.
This applies to all gtk3 panel plugins in xfce4, but since there a not many, I filed this against power manager.
 
Steps to reproduce:
1. Use a theme with bold panel fonts (eg gtk theme Arc)
2. Right click on power-manager plugin.

Expected:
Normal font weight in the context menu, which would match the gtk2 behavior.

Actual result:
Bold font weight in the contect menu.

Further information:
The problem seems to result from the wrong css class used for theming the contect menu. As seen in the following snipplet from the gtk theme, .panel .menu should have been used for theming instead of .panel itself, resulting in unexpected behavior in context menues.

Snipplet from the arc gtk theme:
.panel {
  background-color: transparent;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  -gtk-icon-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
  .panel-shadow {
    background-image: none;
    background-color: transparent; }
  .panel .menu {
    box-shadow: none; }
    .panel .menu .menuitem {
      font-weight: normal;
      text-shadow: none;
      -gtk-icon-shadow: none; }
    .panel .menu .window-frame.menu.csd,
    .panel .menu .window-frame.popup.csd {
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); }
  .panel .menubar > .menuitem {
    padding: 3px 6px; }
    .panel .menubar > .menuitem:hover {
      background-color: transparent; }
  .panel .window-frame.menu.csd,
  .panel .window-frame.popup.csd {
    box-shadow: none; }
Comment 1 Simon Steinbeiss editbugs 2017-06-21 21:35:54 CEST
This is not really a bug in the panel.

If you check the Arc theme's SASS/css code, you'll see that it themes the .menu and .menuitem classes instead of using the corresponding nodes "menu" and "menuitem" (which would be correct in this case).
Also, it first styles the xfce4-panel but then overrides its style with Pantheon's Wingpanel (which comes later, so takes precedence).
xfce4-panel:
https://github.com/horst3180/arc-theme/blob/master/common/gtk-3.0/3.20/sass/_applications.scss#L639
wingpanel:
https://github.com/horst3180/arc-theme/blob/master/common/gtk-3.0/3.20/sass/_applications.scss#L764

If you want to get it fixed please submit a bugreport against Arc and feel free to refer to this bugreport.

Bug #13389

Reported by:
Max Zhao
Reported on: 2017-02-27
Last modified on: 2017-06-21

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Version:
4.12.0

Attachments

Additional information