GNOME Bugzilla – Bug 761765
Notes have a grey background rather than a custom color
Last modified: 2017-04-18 00:31:52 UTC
Created attachment 320708 [details] Screenshot Notes used to have a colored background to match their thumbnail in the content grid. Testing 3.19.x with GNOME Continuous from four days ago, the note background is always grey. See the attached screenshot. Also note that the note heading seems to have the wrong font, and doesn't have enough padding above it.
Miiight be bug #757503
did anybody have a chance to try if webkitgtk 2.4.10 fixes this ?
No success, I'm afraid. The editor background stays gray. Although the text color changes from black to white if I select a dark color.
src/bjb-note-view.c static void set_editor_color (GtkWidget *w, GdkRGBA *col) { gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, col); } => https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-background-color "gtk_widget_override_background_color has been deprecated since version 3.16 and should not be used in newly-written code." (i did not go further for now)
yeah, that won't work anymore You can do something like provider = g_object_get_data (widget, "custom-style"); if (provider == NULL) { provider = gtk_css_provider_new (); g_object_set_data_full (widget, "custom-style", provider, g_object_unref); context = gtk_widget_get_style_context (widget); gtk_style_context_add_provider (context, provider); } gtk_css_provider_load_from_data (provider, "* { background: MY_FAVORITE_COLOR; }", -1, NULL);
(In reply to Matthias Clasen from comment #5) > yeah, that won't work anymore > > You can do something like > [...] > > gtk_css_provider_load_from_data (provider, "* { background: > MY_FAVORITE_COLOR; }", -1, NULL); ok i will see that ; about "MY FAVOURITE COLOR" : from a rough reading "gdk_rgba_to_string" does provide a css compliant string.
(In reply to Pierre-Yves Luyten from comment #6) > ok i will see that ; about "MY FAVOURITE COLOR" : from a rough reading > "gdk_rgba_to_string" does provide a css compliant string. Yes, that should work.
This bug only started occurring for me once I upgraded to Fedora 24, and only when I have Global Dark Mode enabled in GNOME Tweak Tool. When that is set, should we disable the option to change the note background color? That's the approach taken by GNOME Builder.
I have been having the same issue since I updated to Fedora 24. I don't have Global Dark Mode enabled.
It's the same for me: no Dark Mode, but no background color after update to F24. Does one of the suggestions above solve the problem? What exactly do I have to do?
It is still the same with version 3.21.2 on Fedora 25, Wayland session. Does anybody knows a workaround? Any solution?
I suggest you use Gnote instead. It's a nice GNOME 3 notetaking app that's much more mature and has a maintainer who fixes bugs.
Created attachment 348176 [details] [review] note-view: Fix background color Background color was not being used in text view/editor. The code to actually set the background was not even there. After fixing that, as a side effect, it also fixed the text editor which was messing up all text during text edition.
I have pushed this change to my wip/igaldino/webkit2-port branch. Please take a look in this branch because it's our effort to move to webkit2 (duh) and we really need testing there. Thx.
Issue fixed on master: https://git.gnome.org/browse/bijiben/commit/?id=ea3610066fd643f8fb7c5317721ef1dcb0bd6325