Re: Control Center Shell



Thomas Wood wrote:
Denis Washington wrote:
Hi,

I'm pleased to hear about the integration of the SLED control center
shell into gnome-control-center. However, I think it currently looks and
feels a bit alien compared to the other GNOME applications. More
specifically, I noticed the following things:

* The coloring of the side pane is a bit sub-optimal. It seems to change
with the theme, but often doesn't look really nice, for instance there
is much too much grey with the Ubuntu theme (see attached screenshot).
Also, the section headers differ from the GNOME common practice in that
they aren't bold.

* The icon at the right of the search entry, obviously coming from the
slab search entry class, makes sense in SLED where it appears in several
places, but is not common in GNOME and thus has not the effect of
recognition it has in SLED. It might be nice to replace it with a clear
button like the one found in Rhythmbox for instance, this would make it
obvious at least to users of this program that it's a search entry and
also provides extra functionality.

I would be glad to help with the development of the shell if you like.


I would agree with your criticisms, and the best thing to do is dive
right in and start making changes ;-)

I've done a quick patch to make the headings bold, and improve the
colours and borders to be a bit more consistent with the rest of the
desktop.

I've attached the patch and a screenshot to see what people think. The
colour fix is actually quite important, as it replaces
gdk_draw_rectangle() with gtk_paint_flat_box(), which means it will now
obey the users' current theme appearance.

-Thomas

------------------------------------------------------------------------

------------------------------------------------------------------------

Index: libslab/app-shell.c
===================================================================
RCS file: /cvs/gnome/slab/libslab/app-shell.c,v
retrieving revision 1.5
diff -u -p -r1.5 app-shell.c
--- libslab/app-shell.c	1 Nov 2006 20:53:03 -0000	1.5
+++ libslab/app-shell.c	19 Nov 2006 15:08:30 -0000
@@ -249,6 +249,7 @@ layout_shell (AppShellData * app_data, c
 	GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC,
 		GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
 	gtk_container_add (GTK_CONTAINER (sw), app_data->category_layout);
 	GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw));
 	g_object_set (adjustment, "step-increment", (double) 20, NULL);
@@ -665,7 +666,7 @@ create_application_category_sections (Ap
 			G_CALLBACK (handle_group_clicked), app_data);
gchar *markup =
-			g_markup_printf_escaped ("<span size=\"x-large\">%s</span>",
+			g_markup_printf_escaped ("<span size=\"x-large\" weight=\"bold\">%s</span>",
 			data->category);
 		data->section = SLAB_SECTION (slab_section_new_with_markup (markup, Style2));
Index: libslab/shell-window.c
===================================================================
RCS file: /cvs/gnome/slab/libslab/shell-window.c,v
retrieving revision 1.2
diff -u -p -r1.2 shell-window.c
--- libslab/shell-window.c	15 Sep 2006 23:02:11 -0000	1.2
+++ libslab/shell-window.c	19 Nov 2006 15:08:31 -0000
@@ -91,8 +91,8 @@ shell_window_new (AppShellData * app_dat
 	gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
 	/*
 	printf("shadow type:%d\n", gtk_frame_get_shadow_type(GTK_FRAME(window)));
-	gtk_frame_set_shadow_type(GTK_FRAME(window), GTK_SHADOW_NONE);
 	*/
+	gtk_frame_set_shadow_type(GTK_FRAME(window), GTK_SHADOW_NONE);
window->_hbox = GTK_BOX (gtk_hbox_new (FALSE, 0));
 	gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (window->_hbox));
@@ -162,7 +162,7 @@ shell_window_set_contents (ShellWindow *
 	shell->_right_pane = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
gtk_alignment_set_padding (GTK_ALIGNMENT (shell->_left_pane), 15, 15, 15, 15);
-	gtk_alignment_set_padding (GTK_ALIGNMENT (shell->_right_pane), 0, 0, 1, 0);	/* space for vertical line */
+	gtk_alignment_set_padding (GTK_ALIGNMENT (shell->_right_pane), 0, 0, 0, 0);	/* space for vertical line */
gtk_box_pack_start (shell->_hbox, shell->_left_pane, FALSE, FALSE, 0);
 	gtk_box_pack_start (shell->_hbox, shell->_right_pane, TRUE, TRUE, 0);	/* this one takes any extra space */
@@ -181,7 +181,7 @@ shell_window_paint_window (GtkWidget * w
 	right_pane = SHELL_WINDOW (widget)->_right_pane;
/* draw left pane background */
-	gdk_draw_rectangle (widget->window, widget->style->bg_gc[GTK_STATE_ACTIVE], TRUE,
+	gtk_paint_flat_box (widget->style, widget->window, widget->state, GTK_SHADOW_NONE, NULL, widget, "",
 		left_pane->allocation.x, left_pane->allocation.y, left_pane->allocation.width,
 		left_pane->allocation.height);
@@ -197,6 +197,7 @@ shell_window_paint_window (GtkWidget * w
 	 */
/* draw pane separator */
+	/*
 	GdkGC *line_gc = widget->style->fg_gc[GTK_STATE_INSENSITIVE];
 	GdkGCValues values;
 	gdk_gc_get_values (line_gc, &values);
@@ -208,7 +209,7 @@ shell_window_paint_window (GtkWidget * w
 		right_pane->allocation.y + right_pane->allocation.height - 1);
 	values.line_width = orig_line_width;
 	gdk_gc_set_values (line_gc, &values, GDK_GC_LINE_WIDTH);
-
+	*/
 	/*
 	   gdk_gc_set_line_attributes(widget->style->black_gc, 2, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_ROUND);
 	   gdk_draw_line (
Index: libslab/slab-section.c
===================================================================
RCS file: /cvs/gnome/slab/libslab/slab-section.c,v
retrieving revision 1.2
diff -u -p -r1.2 slab-section.c
--- libslab/slab-section.c	15 Sep 2006 23:02:11 -0000	1.2
+++ libslab/slab-section.c	19 Nov 2006 15:08:31 -0000
@@ -169,7 +169,7 @@ slab_section_new (const gchar * title, S
 	GtkWidget *section;
 	gchar *markup;
- markup = g_strdup_printf ("<span size=\"large\">%s</span>", title);
+	markup = g_strdup_printf ("<span size=\"large\" weight=\"bold\">%s</span>", title);
 	section = slab_section_new_with_markup (markup, style);
g_free (markup);

Nice, I like your work! Your right, coding is better than criticizing, so I'll start working on the clear button right NOW. ;)

Another thing that certainly needs work is the context menu for the control center entries. The "Add to Favorites" button is for instance practically useless because we don't use the SLAB menu by default, maybe it's availability could be a build or gconf option. Also the bold "Start ..." makes sense for Windows users, but is not common for GNOME. The entries may also need some icons for a better appearance. I'll try to work on all those things and submit some patches soon.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]