GNOME Bugzilla – Bug 733011
Add application-specific theme extensions
Last modified: 2014-07-24 12:12:11 UTC
Based on code from patches to Bug 732995
Created attachment 280413 [details] [review] Add application-specific theme extensions
Created attachment 280424 [details] [review] Add application-specific theme extensions
Review of attachment 280424 [details] [review]: Thanks for the patch, Pranav. ::: data/Makefile.am @@ +20,3 @@ + sidebar-radio-prelight.svg \ + sidebar-radio-selected-prelight.svg \ + sidebar-radio-selected.svg \ These should go to EXTRA_DIST. The fact that thumbnail-frame.png is still there is a mistake. It should have been moved in b09166df935d79c226fc2fa58bd2da2ffb243bf9 The reason being that all these files are embedded into the gnome-photos binary using GResource. Therefore there is no need to install them separately. We only need to have them in the tarball. ::: src/photos-application.c @@ +738,3 @@ + static GtkCssProvider *provider; + + if (pspec == NULL || g_str_equal (pspec->name, "gtk-theme-name")) If we connect to notify::gtk-theme-name then we don't need this. @@ +781,3 @@ + settings = gtk_settings_get_default (); + g_signal_connect (settings, "notify", G_CALLBACK (theme_changed), NULL); + theme_changed (settings, NULL, NULL); We can move these two lines to photos_application_startup where we set the dark theme. ::: src/photos-preview-view.c @@ +199,3 @@ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (self), GTK_SHADOW_IN); context = gtk_widget_get_style_context (GTK_WIDGET (self)); + gtk_style_context_add_class (context, "photos-scrolledwin"); I think this needs to stay 'documents-scrolledwin' for the moment because it is also used inside libgd, which is shared across gnome-documents, gnome-photos and others. Maybe we can rename it to 'gd-scrolledwin', but that would need changes to libgd. Feel free to file a bug against libgd.
Review of attachment 280424 [details] [review]: ::: data/Adwaita.css @@ +50,3 @@ + border-width: 1px 0 0; + border-radius: 0; +} Should be documents-scrolledwin, as noted elsewhere. We should also carry the documents-counter class because GdMainView can use it. @@ +53,3 @@ + +.photos-collection-icon { + border-radius: 8px; We are missing background-color, which causes the collection icons to have transparent backgrounds.
For some reason GdTogglePixbufRenderer is not rendering the check boxes when an item is right-clicked. It is done using standard gtk+ style classes and gtk_render_check so probably not something we need to worry about in the application.
Created attachment 280842 [details] [review] Add application-specific theme extensions Addressed the issues in comment 3 and comment 4
Created attachment 281103 [details] [review] theme: Add CSS snippet for GdMainIconView As pointed out by Cosimo.
Created attachment 281469 [details] [review] build: Add Adwaita.css to EXTRA_DIST
Created attachment 281575 [details] [review] theme: Add documents-entry-tag style class
Created attachment 281576 [details] [review] theme: Add missing colour definitions