-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add explicit colors to labels, buttons and entries. Make colors role based #65
base: master
Are you sure you want to change the base?
Conversation
I'd certainly like to get thinks working better on non-default color schemes (although I can't see how to switch GNOME 3 to a different theme). However, these changes are adding huge amounts of noise to gui.go. Go defaults all values to zero so defaults can be implemented in gtk.go without needing to set the colors of every Label. Also, I would suspect (although I've no idea) that GTK has some standard way to set colors based on the theme, no? I fully admit that the current code is probably wrong for non-default colors and I should probably read the GTK docs about it. |
That's all fair feedback. =) This is the info I've found so far: GTK will use the color from the operating system/WM if you don't set it explicitly, OR you set it to 0. The problem with this is that if you set some of the colors, like the foreground for headers, but nothing else, that means the headers will always have the right color, but the places where you haven't explicitly set the color will use the theme color. That means you can end up with dark font color on dark background very easily. It seems to me that the only solution is to set ALL the colors explicitly, or set none of them. There might exist an inbetween, but I haven't seen it. (This is why I set all of the values explicitly in the patch, even though they will sometimes be 0). I'll continue looking at it and see if I can figure out a better solution. How wedded are you to the current color scheme you're using? |
I flipped over to the dark theme and I agree that it's a mess. I also tried disabling all color settings and that's a disaster in every case, so some colors need to be set. However, having different "themes" in Pond seems like the wrong approach. Rather I think the colors perhaps should be symbolic and resolved via the GTK theme. The Dark theme clearly has a concept of background colors etc. It's perfectly fine for the Pond colors to change somewhat to match. I'm working on a Cocoa UI at the moment but, if I were playing with this then I think I'd start by poking gtk_style_context_get_background_color, and similar functions, which might do what's needed. |
I'd trouble controlling the border of a widget, and finding the right font. See the code and comments here : |
The Pond GUI currently is almost unusable if you have changed the theme to different colors. (For example the Gnome 3 dark theme). As a first step to fixing this, these commits refactor the GUI to use role based colors only, and explicitly setting the colors in all places where necessary.
There are still some issues. Specifically, the main background of the UI, the background of buttons and entries doesn't seem to honor the widgetBase background specification at all - not sure why this happens.