mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 10:45:41 +00:00
last minute tweak for demo release for label color used to display
last minute tweak for demo release for label color used to display additional info: now we get it from the theme.
This commit is contained in:
parent
fb93d81e6d
commit
bb7298ba97
16
ChangeLog
16
ChangeLog
|
@ -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
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue