From d882420be63f1979ff89a8e99be0f0791a45a0ff Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 5 Nov 2004 06:07:44 +0000 Subject: Markup fixes. 2004-11-04 Matthias Clasen * gtk/tmpl/gtkaboutdialog.sgml: * gtk/migrating-GtkColorButton.sgml: * gtk/migrating-GtkIconView.sgml: * gtk/migrating-GtkAboutDialog.sgml: Markup fixes. --- docs/reference/gtk/migrating-GtkColorButton.sgml | 30 ++++++++++++++---------- 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'docs/reference/gtk/migrating-GtkColorButton.sgml') diff --git a/docs/reference/gtk/migrating-GtkColorButton.sgml b/docs/reference/gtk/migrating-GtkColorButton.sgml index 183b50d00..8bc79c824 100644 --- a/docs/reference/gtk/migrating-GtkColorButton.sgml +++ b/docs/reference/gtk/migrating-GtkColorButton.sgml @@ -4,14 +4,18 @@ Since version 2.6, GTK+ provides the GtkColorButton - widget as a replacement for the GnomeColorPicker widget in the libgnomeui library. + widget as a replacement for the GnomeColorPicker + widget in the libgnomeui + library. - Porting an application from GnomeColorPicker to GtkColorButton - is very simple. GtkColorButton doesn't support dithering - (since it is rarely needed on modern hardware), and it doesn't have setters and getters to set the - color from floating point or integer components. So instead of + Porting an application from GnomeColorPicker to + GtkColorButton is very simple. + GtkColorButton doesn't support dithering + (since it is rarely needed on modern hardware), and it doesn't have + setters and getters to set the color from floating point or integer + components. So instead of guint red, green, blue, alpha; /* ... */ @@ -21,14 +25,16 @@ GdkColor color; - color.red = red << 8; - color.green = green << 8; - color.blue = blue << 8; - gtk_color_button_set_color (color_picker, &color); - gtk_color_button_set_alpha (color_picker, alpha << 8); + color.red = red << 8; + color.green = green << 8; + color.blue = blue << 8; + gtk_color_button_set_color (color_picker, &color); + gtk_color_button_set_alpha (color_picker, alpha << 8); - and similarly for the setters taking other number formats. For gnome_color_picker_set_i16() no conversion - is needed, for gome_color_picker_set_d(), you need to convert the color components like this: + and similarly for the setters taking other number formats. For + gnome_color_picker_set_i16() no conversion is needed, + for gnome_color_picker_set_d(), you need to convert + the color components like this: color.red = (guint16) (red * 65535.0 + 0.5); color.green = (guint16) (green * 65535.0 + 0.5); -- cgit v1.2.1