[mutter] theme-viewer: Port from GdkColor to GdkRGBA
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme-viewer: Port from GdkColor to GdkRGBA
- Date: Fri, 8 Jul 2011 19:41:49 +0000 (UTC)
commit 60ee25d8d5c29dd01709b33a9fcbdfcce9946707
Author: Florian MÃllner <fmuellner gnome org>
Date: Wed May 18 19:36:10 2011 +0200
theme-viewer: Port from GdkColor to GdkRGBA
GdkColor is about to be deprecated, so move to GdkRGBA instead.
https://bugzilla.gnome.org/show_bug.cgi?id=650586
src/ui/theme-viewer.c | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 6aed2d3..08d8e13 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -355,14 +355,15 @@ border_only_contents (void)
GtkWidget *event_box;
GtkWidget *vbox;
GtkWidget *w;
- GdkColor color;
+ GdkRGBA color;
event_box = gtk_event_box_new ();
- color.red = 40000;
+ color.red = 0.6;
color.green = 0;
- color.blue = 40000;
- gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
+ color.blue = 0.6;
+ color.alpha = 1.0;
+ gtk_widget_override_background_color (event_box, 0, &color);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
@@ -477,7 +478,7 @@ preview_collection (int font_size,
{
GtkWidget *box;
GtkWidget *sw;
- GdkColor desktop_color;
+ GdkRGBA desktop_color;
int i;
GtkWidget *eventbox;
@@ -495,11 +496,12 @@ preview_collection (int font_size,
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), eventbox);
- desktop_color.red = 0x5144;
- desktop_color.green = 0x75D6;
- desktop_color.blue = 0xA699;
+ desktop_color.red = 0.32;
+ desktop_color.green = 0.46;
+ desktop_color.blue = 0.65;
+ desktop_color.alpha = 1.0;
- gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL, &desktop_color);
+ gtk_widget_override_background_color (eventbox, 0, &desktop_color);
i = 0;
while (i < META_FRAME_TYPE_LAST)
@@ -694,7 +696,7 @@ previews_of_button_layouts (void)
static gboolean initted = FALSE;
GtkWidget *box;
GtkWidget *sw;
- GdkColor desktop_color;
+ GdkRGBA desktop_color;
int i;
GtkWidget *eventbox;
@@ -718,11 +720,12 @@ previews_of_button_layouts (void)
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), eventbox);
- desktop_color.red = 0x5144;
- desktop_color.green = 0x75D6;
- desktop_color.blue = 0xA699;
+ desktop_color.red = 0.32;
+ desktop_color.green = 0.46;
+ desktop_color.blue = 0.65;
+ desktop_color.alpha = 1.0;
- gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL, &desktop_color);
+ gtk_widget_override_background_color (eventbox, 0, &desktop_color);
i = 0;
while (i < BUTTON_LAYOUT_COMBINATIONS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]