Skip to content
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

Fix label styles for xfdesktop 4.19 #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreldm
Copy link
Contributor

@andreldm andreldm commented Mar 25, 2023

Xfdesktop from git master (54f5e219)

Light Dark
Before image image
After image image

dark/gtk-3.0/_xfce.scss Show resolved Hide resolved
dark/gtk-3.0/_xfce.scss Show resolved Hide resolved
dark/gtk-3.0/_xfce.scss Show resolved Hide resolved
dark/gtk-3.0/_xfce.scss Show resolved Hide resolved
dark/gtk-3.0/_xfce.scss Show resolved Hide resolved
light/gtk-3.0/_xfce.scss Show resolved Hide resolved
light/gtk-3.0/_xfce.scss Show resolved Hide resolved
light/gtk-3.0/_xfce.scss Show resolved Hide resolved
light/gtk-3.0/_xfce.scss Show resolved Hide resolved
light/gtk-3.0/_xfce.scss Show resolved Hide resolved
@andreldm
Copy link
Contributor Author

andreldm commented Nov 2, 2023

@kelnos when you have the time, please take a look at this PR, I don't remember what was the rationale for the changes you introduced to xfdesktop in 4.19.x, what reminded me about this issue is because I stopped using dark themes and xfdesktop when unfocused looks terrible.

@kelnos
Copy link

kelnos commented Nov 2, 2023

@andreldm the rationale was to have xfdesktop actually follow the theme and theme states properly, not the wrong thing I originally did ~15 years ago.

I'm not really an expert in GTK's CSS, so not sure I can provide a valuable review here. I guess it looks fine?

Ultimately I'd like most of the style settings to be overrideable by the user from the desktop settings panel. I think it's reasonable to allow someone to do that for something like the desktop, where background colors and images can have a variety of different color schemes that may not go well with the theme.

@andreldm
Copy link
Contributor Author

andreldm commented Nov 2, 2023

@kelnos thanks for the response, just keep in mind that your changes also affect Adwaita, that's one of the themes we (Xfce) try to look ok, but I doubt its maintainers will add a style override for xfdesktop.

@kelnos
Copy link

kelnos commented Nov 2, 2023

Understood, and thanks for the warning about Adwaita.

Another option (instead of doing style overrides in the theme like you've done here: as I said, I plan to make a bunch of these settable in the desktop settings panel -- would it make sense to set the default values for those to make things look as close as possible to what the 4.18 styling rules do? That would make it less of a shock for people updating, but they can still play around with the styles in the settings dialog (and even disable the overrides entirely so it uses the theme settings, if they want).

@andreldm
Copy link
Contributor Author

andreldm commented Nov 7, 2023

Sorry for the late reply, IMHO this is about styling not setting/preferences, but providing minimally good-looking default is still better than relying on themes to catch up.

@kelnos
Copy link

kelnos commented Nov 8, 2023

Sure, that makes sense.

The thing is, though 4.19.x now actually is using the default styling for an icon view, according to the theme. Unless I've made some (more) mistakes, the style classes and widget state flags during rendering now actually get set correctly for each component that gets drawn, which was not the case before. I think that's really the only sane way to do it.

When I originally wrote XfdesktopIconView ~15 years ago, I had no idea what I was doing when it came to styles and how the widget states mapped to what was shown on the screen, so I just tried a bunch of things until I ended up with something that looked ok, without really understanding why. Of course, that was on GTK2; someone else did the GTK3 porting, and didn't really fix my mistakes (not their fault, of course).

Now, 4.19 may not look super great; I agree that your "Before" screenshots aren't the best, and the "After" ones look much better. If there's a way we can get xfdesktop to look like that by default, but without doing insane/incorrect things with the style classes or widget states while drawing, then sure, let's do that. But if not, then I don't think I want to change anything.

So it's up to you if you want to put (more?) xfdesktop-specific things into themes at this point. But consider also that the 4.20 release isn't for another year, and it's possible I/we might find a still-correct but better-looking way to do the drawing that wouldn't require that every theme have styles added in order to look good. I'm working on some other projects right now, but I'm hoping to get back to xfdesktop in a few months.

@andreldm
Copy link
Contributor Author

andreldm commented Nov 9, 2023

Alright, I agree, let's sit on this issue for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants