diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2000-08-08 01:42:34 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2000-08-08 01:42:34 +0000 |
commit | bb7298ba976a737ab87e736da4126f2cdeadcd89 (patch) | |
tree | 1bb27bc00006370971938eb9cd3ad17a60f5d9c2 | |
parent | fb93d81e6d32b870632ed2aeff039c121c2752da (diff) | |
download | nautilus-bb7298ba976a737ab87e736da4126f2cdeadcd89.tar.gz |
last minute tweak for demo release for label color used to displayEAZEL_NAUTILUS_DEMO_2_ANCHOR
last minute tweak for demo release for label color used to
display additional info: now we get it from the theme.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | icons/arlo/arlo.xml | 2 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-icon-canvas-item.c | 2 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-icon-container.c | 30 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-canvas-item.c | 2 | ||||
-rw-r--r-- | libnautilus-private/nautilus-icon-container.c | 30 | ||||
-rw-r--r-- | src/nautilus-sidebar-title.c | 5 |
7 files changed, 74 insertions, 13 deletions
@@ -1,3 +1,19 @@ +2000-08-07 Andy Hertzfeld <andy@eazel.com> + + last minute tweak for demo release of info color text: now it + gets it from the current theme + * icons/arlo/arlo.xml: + added info color values for arlo theme + * libnautilus-extensions/nautilus-icon-canvas-item.c: + (nautilus_icon_canvas_item_initialize_class): + made the selected info color a more neutral gray + * libnautilus-extensions/nautilus-icon-container.c: + (update_label_color): + get the info color from the theme + * src/nautilus-sidebar-title.c: + (nautlius_sidebar_title_select_text_color): + for now, use the same color as the name + 2000-08-07 Maciej Stachowiak <mjs@eazel.com> * CVSVERSION: New file, used to detect whether we are configuring diff --git a/icons/arlo/arlo.xml b/icons/arlo/arlo.xml index e20bc7110..1cb555532 100644 --- a/icons/arlo/arlo.xml +++ b/icons/arlo/arlo.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <theme name="arlo"> - <directory BACKGROUND_TILE_IMAGE="./backgrounds/window_pattern.png"/> + <directory BACKGROUND_TILE_IMAGE="./backgrounds/window_pattern.png" DARK_INFO_COLOR="0x777777" LIGHT_INFO_COLOR="0xAAAAAA"/> <sidebar SIDEBAR_BACKGROUND_COLOR="rgb:6666/9999/9999-rgb:0000/3333/3333|90-rgb:0000/0000/0000:h" SIDEBAR_BACKGROUND_TILE_IMAGE="backgrounds/.striated.png" TAB_PIECE_IMAGES="sidebar_tab_pieces" COMBINE="TRUE" LEFT_OFFSET="0" TEXT_H_OFFSET="-4" LABEL_COLOR="rgb:FFFF/FFFF/FFFF" /> <desktop BACKGROUND_TILE_IMAGE="./backgrounds/desktop_pattern.png"/> diff --git a/libnautilus-extensions/nautilus-icon-canvas-item.c b/libnautilus-extensions/nautilus-icon-canvas-item.c index aa1b3569b..d94ea8d4d 100644 --- a/libnautilus-extensions/nautilus-icon-canvas-item.c +++ b/libnautilus-extensions/nautilus-icon-canvas-item.c @@ -236,7 +236,7 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class) /* set up the highlight colors - soon, get these from preferences */ gdk_color_parse ("rgb:00/00/00", &highlight_background_color); gdk_color_parse ("rgb:FF/FF/FF", &highlight_text_color); - gdk_color_parse ("rgb:AA/AA/FF", &highlight_text_info_color); + gdk_color_parse ("rgb:AA/AA/AA", &highlight_text_info_color); } /* Object initialization function for the icon item. */ diff --git a/libnautilus-extensions/nautilus-icon-container.c b/libnautilus-extensions/nautilus-icon-container.c index 26bce7073..e328b5c64 100644 --- a/libnautilus-extensions/nautilus-icon-container.c +++ b/libnautilus-extensions/nautilus-icon-container.c @@ -47,7 +47,7 @@ #include "nautilus-icon-text-item.h" #include "nautilus-font-factory.h" #include "nautilus-lib-self-check-functions.h" - +#include "nautilus-theme.h" #include "nautilus-icon-private.h" /* Interval for updating the rubberband selection, in milliseconds. */ @@ -3808,15 +3808,37 @@ static void update_label_color (NautilusBackground *background, NautilusIconContainer *container) { + char *light_info_color, *dark_info_color; + uint light_info_value, dark_info_value; + g_assert (NAUTILUS_IS_BACKGROUND (background)); g_assert (NAUTILUS_IS_ICON_CONTAINER (container)); + /* read the info colors from the current theme; use a reasonable default if undefined */ + light_info_color = nautilus_theme_get_theme_data ("directory", "LIGHT_INFO_COLOR"); + if (light_info_color == NULL) { + light_info_value = 0xAAAAFD; + } else { + light_info_value = strtoul (light_info_color, NULL, 0); + g_free (light_info_color); + } + + dark_info_color = nautilus_theme_get_theme_data ("directory", "DARK_INFO_COLOR"); + if (dark_info_color == NULL) { + dark_info_value = 0x33337F; + } else { + dark_info_value = strtoul (dark_info_color, NULL, 0); + g_message ("dark info color is %s, value is %8x", dark_info_color, + dark_info_value); + g_free (dark_info_color); + } + if (nautilus_background_is_dark (background)) { container->details->label_color = 0xEFEFEF; - container->details->label_info_color = 0xAAAAEF; + container->details->label_info_color = light_info_value; } else { - container->details->label_color = 000000; - container->details->label_info_color = 0x00007F; + container->details->label_color = 0x000000; + container->details->label_info_color = dark_info_value; } } diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c index aa1b3569b..d94ea8d4d 100644 --- a/libnautilus-private/nautilus-icon-canvas-item.c +++ b/libnautilus-private/nautilus-icon-canvas-item.c @@ -236,7 +236,7 @@ nautilus_icon_canvas_item_initialize_class (NautilusIconCanvasItemClass *class) /* set up the highlight colors - soon, get these from preferences */ gdk_color_parse ("rgb:00/00/00", &highlight_background_color); gdk_color_parse ("rgb:FF/FF/FF", &highlight_text_color); - gdk_color_parse ("rgb:AA/AA/FF", &highlight_text_info_color); + gdk_color_parse ("rgb:AA/AA/AA", &highlight_text_info_color); } /* Object initialization function for the icon item. */ diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c index 26bce7073..e328b5c64 100644 --- a/libnautilus-private/nautilus-icon-container.c +++ b/libnautilus-private/nautilus-icon-container.c @@ -47,7 +47,7 @@ #include "nautilus-icon-text-item.h" #include "nautilus-font-factory.h" #include "nautilus-lib-self-check-functions.h" - +#include "nautilus-theme.h" #include "nautilus-icon-private.h" /* Interval for updating the rubberband selection, in milliseconds. */ @@ -3808,15 +3808,37 @@ static void update_label_color (NautilusBackground *background, NautilusIconContainer *container) { + char *light_info_color, *dark_info_color; + uint light_info_value, dark_info_value; + g_assert (NAUTILUS_IS_BACKGROUND (background)); g_assert (NAUTILUS_IS_ICON_CONTAINER (container)); + /* read the info colors from the current theme; use a reasonable default if undefined */ + light_info_color = nautilus_theme_get_theme_data ("directory", "LIGHT_INFO_COLOR"); + if (light_info_color == NULL) { + light_info_value = 0xAAAAFD; + } else { + light_info_value = strtoul (light_info_color, NULL, 0); + g_free (light_info_color); + } + + dark_info_color = nautilus_theme_get_theme_data ("directory", "DARK_INFO_COLOR"); + if (dark_info_color == NULL) { + dark_info_value = 0x33337F; + } else { + dark_info_value = strtoul (dark_info_color, NULL, 0); + g_message ("dark info color is %s, value is %8x", dark_info_color, + dark_info_value); + g_free (dark_info_color); + } + if (nautilus_background_is_dark (background)) { container->details->label_color = 0xEFEFEF; - container->details->label_info_color = 0xAAAAEF; + container->details->label_info_color = light_info_value; } else { - container->details->label_color = 000000; - container->details->label_info_color = 0x00007F; + container->details->label_color = 0x000000; + container->details->label_info_color = dark_info_value; } } diff --git a/src/nautilus-sidebar-title.c b/src/nautilus-sidebar-title.c index 659be9660..1ff823bdc 100644 --- a/src/nautilus-sidebar-title.c +++ b/src/nautilus-sidebar-title.c @@ -208,12 +208,13 @@ nautlius_sidebar_title_select_text_color (NautilusSidebarTitle *sidebar_title) sidebar = GTK_WIDGET (sidebar)->parent; background = nautilus_get_widget_background (sidebar); + /* FIXME: for now, both the title and info colors are the same */ if (nautilus_background_is_dark (background)) { sidebar_title_color = g_strdup("rgb:FFFF/FFFF/FFFF"); - sidebar_info_title_color = g_strdup("rgb:AAAA/AAAA/FFFF"); + sidebar_info_title_color = g_strdup("rgb:FFFF/FFFF/FFFF"); } else { sidebar_title_color = g_strdup("rgb:0000/0000/0000"); - sidebar_info_title_color = g_strdup("rgb:0000/0000/7FFF"); + sidebar_info_title_color = g_strdup("rgb:0000/0000/0000"); } set_widget_color (sidebar_title->details->title, sidebar_title_color); |