Code

adding color management icons to fill&stroke dialog
authorJucaBlues <JucaBlues@users.sourceforge.net>
Tue, 11 Aug 2009 04:22:47 +0000 (04:22 +0000)
committerJucaBlues <JucaBlues@users.sourceforge.net>
Tue, 11 Aug 2009 04:22:47 +0000 (04:22 +0000)
share/icons/Makefile.am
share/icons/color-management-icon.png [new file with mode: 0644]
share/icons/out-of-gamut-icon.png [new file with mode: 0644]
share/icons/out-of-gamut-icon.svg [new file with mode: 0644]
src/widgets/sp-color-notebook.cpp

index e39174833ba753db09552c7c54c804d85e3784dc..4356365b844216fa4401a603650ab83d2422b5d5 100644 (file)
@@ -1,6 +1,9 @@
 iconsdir = $(datadir)/inkscape/icons
 
 pixmaps = \
+       out-of-gamut-icon.png \
+       out-of-gamut-icon.svg \
+       color-management-icon.png \
        remove-color.png \
        remove-color.svg \
     ticotico.jpg \
diff --git a/share/icons/color-management-icon.png b/share/icons/color-management-icon.png
new file mode 100644 (file)
index 0000000..469ccd7
Binary files /dev/null and b/share/icons/color-management-icon.png differ
diff --git a/share/icons/out-of-gamut-icon.png b/share/icons/out-of-gamut-icon.png
new file mode 100644 (file)
index 0000000..1e96a95
Binary files /dev/null and b/share/icons/out-of-gamut-icon.png differ
diff --git a/share/icons/out-of-gamut-icon.svg b/share/icons/out-of-gamut-icon.svg
new file mode 100644 (file)
index 0000000..4fb1711
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="249.50522"
+   height="249.50523"
+   id="svg2">
+  <defs
+     id="defs4" />
+  <g
+     transform="translate(-218.10454,-476.18098)"
+     id="layer1">
+    <path
+       d="m 462.85715,600.93359 c 0,66.27417 -53.72583,120 -120,120 -66.27417,0 -120,-53.72583 -120,-120 0,-66.27417 53.72583,-120 120,-120 66.27417,0 120,53.72583 120,120 z m 182.9912,0 c 0,167.33742 -135.65378,302.99121 -302.9912,302.99121 -167.33743,0 -302.991208,-135.65379 -302.991208,-302.99121 0,-167.33742 135.653778,-302.9912 302.991208,-302.9912 167.33742,0 302.9912,135.65378 302.9912,302.9912 z"
+       transform="matrix(0.3960511,0,0,0.3960511,207.0682,362.93318)"
+       id="path2818"
+       style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:24;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" />
+  </g>
+</svg>
index 779895de43bf1524401217284ae1259e9b07e034..58974131e6986cdf7fd47a8674046d1933e45bcb 100644 (file)
@@ -324,9 +324,25 @@ void ColorNotebook::init()
 
        row++;
 
-       /* Create RGBA entry and color preview */
        GtkWidget *rgbabox = gtk_hbox_new (FALSE, 0);
+       /* Create color management icons */
+        GtkWidget *box_colormanaged = gtk_event_box_new ();
+        GtkWidget *colormanaged = gtk_image_new_from_icon_name ("color-management-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
+        gtk_container_add (GTK_CONTAINER (box_colormanaged), colormanaged);
+        GtkTooltips *tooltips_colormanaged = gtk_tooltips_new ();
+        gtk_tooltips_set_tip (tooltips_colormanaged, box_colormanaged, _("Color Managed"), "");
+        //gtk_widget_hide (GTK_WIDGET (box_colormanaged));
+       gtk_box_pack_start(GTK_BOX(rgbabox), box_colormanaged, TRUE, FALSE, 2);
+
+        GtkWidget *box_outofgamut = gtk_event_box_new ();
+        GtkWidget *outofgamut = gtk_image_new_from_icon_name ("out-of-gamut-icon", GTK_ICON_SIZE_SMALL_TOOLBAR);
+        gtk_container_add (GTK_CONTAINER (box_outofgamut), outofgamut);
+        GtkTooltips *tooltips_outofgamut = gtk_tooltips_new ();
+        gtk_tooltips_set_tip (tooltips_outofgamut, box_outofgamut, _("Out of gamut!"), "");
+        //gtk_widget_hide (GTK_WIDGET (box_outofgamut));
+       gtk_box_pack_start(GTK_BOX(rgbabox), box_outofgamut, TRUE, FALSE, 2);        
 
+       /* Create RGBA entry and color preview */
        _rgbal = gtk_label_new_with_mnemonic (_("RGBA_:"));
        gtk_misc_set_alignment (GTK_MISC (_rgbal), 1.0, 0.5);
        gtk_box_pack_start(GTK_BOX(rgbabox), _rgbal, TRUE, TRUE, 2);