summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2001-01-20 22:13:08 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2001-01-20 22:13:08 +0000
commit7610b9f2887ae1c488f1c5515851f8b033a66a83 (patch)
treedb0e305670dc02dcae55e547d7e31d85cd045e05 /src
parent3bb85246d328636dbca109c1a2b8fd387dbf78d1 (diff)
downloadnautilus-7610b9f2887ae1c488f1c5515851f8b033a66a83.tar.gz
fixed bug 3165, Customization Dialog needs layout tweaking, by working
* src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (make_property_tile), (nautilus_property_browser_update_contents): fixed bug 3165, Customization Dialog needs layout tweaking, by working with Arlo to improve it. We also made it more GTK-theme compliant * src/nautilus-theme-selector.c: (nautilus_theme_selector_initialize): Arlo and I also improved the theme selector in a similar fashion, including making it GTK-theme complaint.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-property-browser.c62
-rw-r--r--src/nautilus-theme-selector.c41
2 files changed, 41 insertions, 62 deletions
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index 6929bec2d..b0e5548ad 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -181,7 +181,6 @@ static void emit_emblems_changed_signal (void);
static char * strip_extension (const char *string_to_strip);
#define BROWSER_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF"
-#define BROWSER_TITLE_BAR_COLOR "rgb:D6D6/D6D6/D6D6"
#define THEME_SELECT_COLOR "rgb:FFFF/9999/9999"
@@ -232,7 +231,6 @@ nautilus_property_browser_initialize_class (GtkObjectClass *object_klass)
static void
nautilus_property_browser_initialize (GtkObject *object)
{
- NautilusBackground *background;
NautilusPropertyBrowser *property_browser;
GtkWidget* widget, *temp_box, *temp_hbox, *temp_frame;
GtkWidget* temp_button, *temp_label;
@@ -260,12 +258,7 @@ nautilus_property_browser_initialize (GtkObject *object)
gtk_window_set_title (GTK_WINDOW (widget), _("Backgrounds and Emblems"));
gtk_window_set_wmclass (GTK_WINDOW (widget), "property_browser", "Nautilus");
nautilus_gtk_window_set_up_close_accelerator (GTK_WINDOW (widget));
-
- /* set up the background */
-
- background = nautilus_get_widget_background (GTK_WIDGET (property_browser));
- nautilus_background_set_color (background, BROWSER_BACKGROUND_COLOR);
-
+
/* create the container box */
property_browser->details->container = GTK_HBOX (gtk_hbox_new (FALSE, 0));
gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->container), 0);
@@ -278,12 +271,9 @@ nautilus_property_browser_initialize (GtkObject *object)
gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->category_container), 0 );
property_browser->details->category_position = -1;
- viewport = gtk_viewport_new(NULL, NULL);
- background = nautilus_get_widget_background (GTK_WIDGET (viewport));
- nautilus_background_set_color (background, BROWSER_TITLE_BAR_COLOR);
-
+ viewport = gtk_viewport_new(NULL, NULL);
gtk_widget_show (viewport);
- gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_OUT);
+ gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
gtk_widget_set_usize (viewport, 76, -1);
gtk_box_pack_start (GTK_BOX (property_browser->details->container),
@@ -306,38 +296,37 @@ nautilus_property_browser_initialize (GtkObject *object)
TRUE, TRUE, 0);
/* create the title box */
-
property_browser->details->title_box = gtk_event_box_new();
gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->title_box), 0);
- background = nautilus_get_widget_background (GTK_WIDGET (property_browser->details->title_box));
- nautilus_background_set_color (background, BROWSER_TITLE_BAR_COLOR);
-
gtk_widget_show(property_browser->details->title_box);
gtk_box_pack_start (GTK_BOX(property_browser->details->content_container),
property_browser->details->title_box,
FALSE, FALSE, 0);
temp_frame = gtk_frame_new(NULL);
- gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_OUT);
+ gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_NONE);
gtk_widget_show(temp_frame);
gtk_container_add(GTK_CONTAINER(property_browser->details->title_box), temp_frame);
temp_hbox = gtk_hbox_new(FALSE, 0);
gtk_widget_show(temp_hbox);
- gtk_container_set_border_width (GTK_CONTAINER (temp_hbox), 2);
+ gtk_container_set_border_width (GTK_CONTAINER (temp_hbox), 4);
gtk_container_add(GTK_CONTAINER(temp_frame), temp_hbox);
/* add the title label */
property_browser->details->title_label = nautilus_label_new ("");
nautilus_label_make_larger (NAUTILUS_LABEL (property_browser->details->title_label), 4);
- gtk_widget_show(property_browser->details->title_label);
+ nautilus_label_make_bold (NAUTILUS_LABEL (property_browser->details->title_label));
+
+ gtk_widget_show(property_browser->details->title_label);
gtk_box_pack_start (GTK_BOX(temp_hbox), property_browser->details->title_label, FALSE, FALSE, 8);
/* add the help label */
property_browser->details->help_label = nautilus_label_new ("");
gtk_widget_show(property_browser->details->help_label);
+ nautilus_label_make_smaller (NAUTILUS_LABEL (property_browser->details->help_label), 2);
gtk_box_pack_end (GTK_BOX(temp_hbox), property_browser->details->help_label, FALSE, FALSE, 8);
/* add the bottom box to hold the command buttons */
@@ -345,16 +334,15 @@ nautilus_property_browser_initialize (GtkObject *object)
gtk_container_set_border_width (GTK_CONTAINER (temp_box), 0);
gtk_widget_show(temp_box);
- background = nautilus_get_widget_background (temp_box);
- nautilus_background_set_color (background, BROWSER_TITLE_BAR_COLOR);
-
temp_frame = gtk_frame_new(NULL);
- gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_IN);
+ gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_NONE);
gtk_widget_show(temp_frame);
gtk_container_add(GTK_CONTAINER(temp_box), temp_frame);
- property_browser->details->bottom_box = gtk_hbox_new(FALSE, 0);
- gtk_widget_show(property_browser->details->bottom_box);
+ property_browser->details->bottom_box = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show (property_browser->details->bottom_box);
+ gtk_container_set_border_width (GTK_CONTAINER (property_browser->details->bottom_box), 4);
+
gtk_box_pack_end (GTK_BOX(property_browser->details->content_container), temp_box, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (temp_frame), property_browser->details->bottom_box);
@@ -362,7 +350,7 @@ nautilus_property_browser_initialize (GtkObject *object)
temp_button = gtk_button_new ();
gtk_widget_show(temp_button);
- temp_label = gtk_label_new (_("Done"));
+ temp_label = gtk_label_new (_(" Done "));
gtk_widget_show(temp_label);
gtk_container_add (GTK_CONTAINER(temp_button), temp_label);
gtk_box_pack_end (GTK_BOX(property_browser->details->bottom_box), temp_button, FALSE, FALSE, 4);
@@ -372,7 +360,7 @@ nautilus_property_browser_initialize (GtkObject *object)
property_browser->details->add_button = gtk_button_new ();
gtk_widget_show(property_browser->details->add_button);
- property_browser->details->add_button_label = gtk_label_new (_("Add new..."));
+ property_browser->details->add_button_label = gtk_label_new (_(" Add new... "));
gtk_widget_show(property_browser->details->add_button_label);
gtk_container_add (GTK_CONTAINER(property_browser->details->add_button),
property_browser->details->add_button_label);
@@ -386,7 +374,7 @@ nautilus_property_browser_initialize (GtkObject *object)
property_browser->details->remove_button = gtk_button_new();
gtk_widget_show(property_browser->details->remove_button);
- property_browser->details->remove_button_label = gtk_label_new (_("Remove..."));
+ property_browser->details->remove_button_label = gtk_label_new (_(" Remove... "));
gtk_widget_show(property_browser->details->remove_button_label);
gtk_container_add (GTK_CONTAINER(property_browser->details->remove_button),
property_browser->details->remove_button_label);
@@ -1704,7 +1692,7 @@ make_property_tile (NautilusPropertyBrowser *property_browser,
(NAUTILUS_LABEL (label), NAUTILUS_SMOOTH_BACKGROUND_SOLID_COLOR);
nautilus_label_set_solid_background_color
(NAUTILUS_LABEL (label), NAUTILUS_RGB_COLOR_WHITE);
-
+ nautilus_label_make_smaller (NAUTILUS_LABEL (label), 2);
gtk_box_pack_end (GTK_BOX (temp_vbox), label, FALSE, FALSE, 2);
gtk_widget_show (label);
}
@@ -2096,7 +2084,7 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro
viewport = gtk_viewport_new(NULL, NULL);
gtk_widget_show(viewport);
- gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
+ gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_IN);
background = nautilus_get_widget_background (viewport);
nautilus_background_set_color (background, BROWSER_BACKGROUND_COLOR);
gtk_container_add (GTK_CONTAINER (property_browser->details->content_container), property_browser->details->content_frame);
@@ -2178,13 +2166,13 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro
} else {
switch (property_browser->details->category_type) {
case NAUTILUS_PROPERTY_PATTERN:
- text = _("Add a new pattern");
+ text = _(" Add a new pattern ");
break;
case NAUTILUS_PROPERTY_COLOR:
- text = _("Add a new color");
+ text = _(" Add a new color ");
break;
case NAUTILUS_PROPERTY_EMBLEM:
- text = _("Add a new emblem");
+ text = _(" Add a new emblem ");
break;
default:
text = NULL;
@@ -2246,13 +2234,13 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro
/* case out instead of substituting to provide flexibilty for other languages */
switch (property_browser->details->category_type) {
case NAUTILUS_PROPERTY_PATTERN:
- text = _("Remove a pattern");
+ text = _(" Remove a pattern ");
break;
case NAUTILUS_PROPERTY_COLOR:
- text = _("Remove a color");
+ text = _(" Remove a color ");
break;
case NAUTILUS_PROPERTY_EMBLEM:
- text = _("Remove an emblem");
+ text = _(" Remove an emblem ");
break;
default:
text = NULL;
diff --git a/src/nautilus-theme-selector.c b/src/nautilus-theme-selector.c
index 5755054db..6ae75be58 100644
--- a/src/nautilus-theme-selector.c
+++ b/src/nautilus-theme-selector.c
@@ -127,9 +127,6 @@ static void clear_style_for_all_rows (NautilusThemeSelector *theme_selector);
#define THEME_SELECTOR_WIDTH 460
#define THEME_SELECTOR_HEIGHT 264
-#define SELECTOR_BACKGROUND_COLOR "rgb:FFFF/FFFF/FFFF"
-#define SELECTOR_TITLE_BAR_COLOR "rgb:D6D6/D6D6/D6D6"
-
static NautilusThemeSelector *main_theme_selector = NULL;
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusThemeSelector, nautilus_theme_selector, GTK_TYPE_WINDOW)
@@ -150,7 +147,6 @@ nautilus_theme_selector_initialize_class (GtkObjectClass *object_klass)
static void
nautilus_theme_selector_initialize (GtkObject *object)
{
- NautilusBackground *background;
NautilusThemeSelector *theme_selector;
GtkWidget* widget, *temp_box, *temp_hbox, *temp_frame;
GtkWidget *scrollwindow;
@@ -171,10 +167,6 @@ nautilus_theme_selector_initialize (GtkObject *object)
gtk_window_set_wmclass(GTK_WINDOW(widget), "theme_selector", "Nautilus");
nautilus_gtk_window_set_up_close_accelerator (GTK_WINDOW (widget));
- /* set up the background */
- background = nautilus_get_widget_background (GTK_WIDGET (theme_selector));
- nautilus_background_set_color (background, SELECTOR_BACKGROUND_COLOR);
-
/* create the container box */
theme_selector->details->container = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (theme_selector->details->container), 0);
@@ -187,14 +179,11 @@ nautilus_theme_selector_initialize (GtkObject *object)
title_box = gtk_event_box_new();
gtk_container_set_border_width (GTK_CONTAINER (title_box), 0);
- background = nautilus_get_widget_background (GTK_WIDGET (title_box));
- nautilus_background_set_color (background, SELECTOR_TITLE_BAR_COLOR);
-
gtk_widget_show(title_box);
gtk_box_pack_start (GTK_BOX(theme_selector->details->container), title_box, FALSE, FALSE, 0);
temp_frame = gtk_frame_new(NULL);
- gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_OUT);
+ gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_NONE);
gtk_widget_show(temp_frame);
gtk_container_add(GTK_CONTAINER(title_box), temp_frame);
@@ -204,7 +193,8 @@ nautilus_theme_selector_initialize (GtkObject *object)
/* add the title label */
theme_selector->details->title_label = nautilus_label_new (_("Nautilus Theme:"));
- nautilus_label_make_larger (NAUTILUS_LABEL (theme_selector->details->title_label), 4);
+ nautilus_label_make_larger (NAUTILUS_LABEL (theme_selector->details->title_label), 2);
+ nautilus_label_make_bold (NAUTILUS_LABEL (theme_selector->details->title_label));
gtk_widget_show(theme_selector->details->title_label);
gtk_box_pack_start (GTK_BOX(temp_hbox), theme_selector->details->title_label, FALSE, FALSE, 8);
@@ -212,7 +202,10 @@ nautilus_theme_selector_initialize (GtkObject *object)
/* add the help label */
theme_selector->details->help_label = nautilus_label_new ("");
set_help_label (theme_selector, FALSE);
- gtk_widget_show(theme_selector->details->help_label);
+ nautilus_label_make_smaller (NAUTILUS_LABEL (theme_selector->details->help_label), 2);
+ nautilus_label_set_justify (NAUTILUS_LABEL (theme_selector->details->help_label), GTK_JUSTIFY_RIGHT);
+
+ gtk_widget_show(theme_selector->details->help_label);
gtk_box_pack_end (GTK_BOX(temp_hbox), theme_selector->details->help_label, FALSE, FALSE, 8);
/* add the main part of the content, which is a list view, embedded in a scrollwindow */
@@ -223,11 +216,12 @@ nautilus_theme_selector_initialize (GtkObject *object)
gtk_clist_set_column_width (GTK_CLIST(theme_selector->details->theme_list), 1, 80);
gtk_clist_set_column_width (GTK_CLIST(theme_selector->details->theme_list), 2, 180);
- gtk_clist_set_shadow_type (GTK_CLIST (theme_selector->details->theme_list), GTK_SHADOW_NONE);
+ gtk_clist_set_shadow_type (GTK_CLIST (theme_selector->details->theme_list), GTK_SHADOW_IN);
scrollwindow = gtk_scrolled_window_new (NULL, gtk_clist_get_vadjustment (GTK_CLIST (theme_selector->details->theme_list)));
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (scrollwindow), theme_selector->details->theme_list);
+ gtk_container_set_border_width (GTK_CONTAINER (scrollwindow), 6);
gtk_clist_set_selection_mode (GTK_CLIST (theme_selector->details->theme_list), GTK_SELECTION_BROWSE);
gtk_box_pack_start (GTK_BOX (theme_selector->details->container), scrollwindow, TRUE, TRUE, 0);
@@ -252,16 +246,14 @@ nautilus_theme_selector_initialize (GtkObject *object)
gtk_container_set_border_width (GTK_CONTAINER (temp_box), 0);
gtk_widget_show(temp_box);
- background = nautilus_get_widget_background (GTK_WIDGET (temp_box));
- nautilus_background_set_color (background, SELECTOR_TITLE_BAR_COLOR);
-
temp_frame = gtk_frame_new(NULL);
- gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_IN);
+ gtk_frame_set_shadow_type(GTK_FRAME(temp_frame), GTK_SHADOW_NONE);
gtk_widget_show(temp_frame);
gtk_container_add(GTK_CONTAINER(temp_box), temp_frame);
- bottom_box = gtk_hbox_new(FALSE, 0);
- gtk_widget_show(bottom_box);
+ bottom_box = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show (bottom_box);
+ gtk_container_set_border_width (GTK_CONTAINER (bottom_box), 4);
gtk_box_pack_end (GTK_BOX(theme_selector->details->container), temp_box, FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (temp_frame), bottom_box);
@@ -269,19 +261,18 @@ nautilus_theme_selector_initialize (GtkObject *object)
theme_selector->details->add_button = gtk_button_new ();
gtk_widget_show(theme_selector->details->add_button);
- theme_selector->details->add_button_label = nautilus_label_new (_("Add new theme"));
- nautilus_label_make_larger (NAUTILUS_LABEL (theme_selector->details->add_button_label), 2);
+ theme_selector->details->add_button_label = gtk_label_new (_(" Add new theme "));
gtk_widget_show(theme_selector->details->add_button_label);
gtk_container_add (GTK_CONTAINER(theme_selector->details->add_button), theme_selector->details->add_button_label);
- gtk_box_pack_end (GTK_BOX(bottom_box), theme_selector->details->add_button, FALSE, FALSE, 4);
+ gtk_box_pack_end (GTK_BOX (bottom_box), theme_selector->details->add_button, FALSE, FALSE, 4);
gtk_signal_connect(GTK_OBJECT (theme_selector->details->add_button), "clicked", GTK_SIGNAL_FUNC (add_new_theme_button_callback), theme_selector);
/* now create the "remove" button */
theme_selector->details->remove_button = gtk_button_new();
- theme_selector->details->remove_button_label = nautilus_label_new (_("Remove theme"));
+ theme_selector->details->remove_button_label = nautilus_label_new (_(" Remove theme "));
nautilus_label_make_larger (NAUTILUS_LABEL (theme_selector->details->remove_button_label), 2);
gtk_widget_show(theme_selector->details->remove_button_label);