-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panel-toplevel: add position css class #828
Conversation
Your CSS is misleading... If I would read this CSS then I would think that this will affect only menu bar applet. Why toplevel has these classes? |
Deleted previous comment as timeline was wrong |
Complete css selector i much longer. mate-panel-menu-bar.gnome-panel-menu-bar was added in the past for some reasons. |
Years ago (MATE 1.9/1.10 era), when I first started working with mate-panel and GTK3, I found that the main menu from the menubar would follow .mate-panel-menu-bar menu while all other menus followed only the GTK theme default. Thus, I added that style class to the toplevel windows of all the other menus, so they would all follow the same theme as the default menubar's main menu. I then made use of that in my UbuntuStudio_Legacy theme. During the GTK 1.20 transition, the comments in the code now in question show there were issues with getting the system background reapplied, and the same style class was applied there. I am NOT sure about this, but I think it may have been somewhere on the toplevel even before then, as this was enough to make the panel respond to the existing themes at the time when deselecting a user selected background. Anyway, that now leaves us with the single style class .mate-panel-menu-bar used too widely. One possible way of refactoring this would be to shorten it just to .mate-panel but still applying the older .mate-panel-menu-bar style class to the panel menu bar itself(the main menu bar applet). Themes could then be backward compatable by listing both style classes with the use of .mate-panel-menu-bar outside the menubar applet deprecated. Changes for such a refactor would be needed in mate-panel, mate-applets, mate-settings-daemon, mate-power-manager, mate-polkit, and all themes. Users would need to change the themes at the same time (or before if backward compatable) as all of these, so at least it would have to be for 3.22 and at that time theme names could advance to 3.24 as GTK also is doing so. |
I think |
But more important is that i wasn't able to use a box-shadow in css.
@lukefromdc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, and the style classes show up in GtkInspector. Will merge as any refactoring is a separate PR
89afc28
to
c4aedbd
Compare
Not sure how big a window the panel toplevel actually uses, but if the window is the same size as the panel than there is no place to render a box shadow. I am not an expert on box shadows, but maybe inset renders over the contents and the rest outside the contents and there is no window space there to draw them? |
The whole _GTK_FRAME_EXTENTS issue in window managers is about rendering the extra space around CSD windows to handle box shadows. The panel is an undecorated window, I don't see any .csd style class applied, so I'm wondering if it gets _GTK_FRAME_EXTENTS of zero px and can't render shadows. A GtkMenu's window cannot be accessed from GtkInspector but those I know act like CSD windows, which is why I had to force transparency on them when the _GTK_FRAME_EXTENTS issue in older compiz version caused them to render in RGB rather than RGBA. Had the toplevel also had this issue, shadows would have worked in Marco with and only with compositing, but transparency of the panel in a system theme would have been impossible with any compiz version except recent compiz-reloaded or the gtk-frame-extents branches. The only place I ever saw shadows with someone's test branch of mate-panel to support them was rendered underneath a transparent panel rather than outside its borders. |
Merged the PR as the style classes work and will allow borders to work and if we ever fix the window issue to allow box shadows will would need this anyway |
In gtk+-2 versions the shadow was outside, that is what users blame us. |
I will cherry-pick that to 1.20 branch. |
Grid is same (?) size as window/toplevel, probably clipped away, but no idea... Maybe something else... To get outset shadow for panel you probably should do that on Then you must deal with turning on/off compisiting manager, otherwise shadow area will be black when composting manager is off... No, |
Yeah, i noticed |
I think so, for some reasons only |
This makes it possible to add theme settings for fixing
#617
#344
#193
An example css for Menta and other light themes which can be used in
~.config/gtk-3.0/gtk.css