rozniak / xfce-winxp-tc

Windows XP stuff for XFCE
Other
1.11k stars 37 forks source link

Start menu needs to look good in all themes #87

Closed rozniak closed 2 years ago

rozniak commented 2 years ago

The Start menu looks pretty bad in Adwaita. Need to sort this and make sure it looks good in all themes, because I plan on making the XP shell work across the board.

rozniak commented 2 years ago

Well I have fixed the bug with the Start menu spawning incorrectly on the Adwaita theme (and others). I say bugfix, it's a bodge but it works: https://github.com/rozniak/xfce-winxp-tc/commit/abfb7370bbce853ab3b8a222b78f2e19d8bfc919

rozniak commented 2 years ago

Kinda figuring this out, so far I have implemented compiling GResources into the build, so the default CSS will be compiled into the application. The CMakeLists.txt is a mess, I'll reorganise it.

Essentially the plan is to provide CSS under the 'fallback' priority, so that for themes that do not override any Start menu styles, it has a good looking default. Themes like Luna and that will then override those defaults to give it the correct XP proportions.

It's a bit annoying (as usual), whilst I have loaded in the CSS from resources into the default screen (https://github.com/rozniak/xfce-winxp-tc/blob/feat-87/shell/start/src/plugin.c#L67) there is a limitation. It seems like when using class selectors (e.g. .xp-start-programs-menu) you cannot then select any of its children (e.g. .xp-start-programs-menu image). You can only traverse elements, or directly select class selectors. I confirmed this using the GTK Inspector - my style rules were not overriden by Adwaita on the children, they simply weren't applied at all. :unamused:

Tomorrow I will go through and add some class selectors for things so that I don't have to do weird traversal CSS to do simple stuff. I mean from playing around with it I wanted to add margin right to the programs and places menu items on the image, to do that the selector was box > menu > menuitem > box > image. Absolute nonsense... also makes it annoying to avoid adding styles to things I don't want.

I will figure it out given some time.