nemo r34 - in trunk: . gtk
- From: arj svn gnome org
- To: svn-commits-list gnome org
- Subject: nemo r34 - in trunk: . gtk
- Date: Mon, 7 Jan 2008 10:47:40 +0000 (GMT)
Author: arj
Date: Mon Jan 7 10:47:40 2008
New Revision: 34
URL: http://svn.gnome.org/viewvc/nemo?rev=34&view=rev
Log:
Make add label menu look better when the item has no labels already
Modified:
trunk/NEWS
trunk/gtk/Cairo.cs
trunk/gtk/Common.cs
trunk/gtk/Label.cs
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Jan 7 10:47:40 2008
@@ -8,6 +8,7 @@
- Make resize work a little better by not redrawing so often
- Don't do needless searching for text and handle the case of empty
search text
+- Make add label menu look better when the item has no labels already
0.1.2 alpha
-----------
Modified: trunk/gtk/Cairo.cs
==============================================================================
--- trunk/gtk/Cairo.cs (original)
+++ trunk/gtk/Cairo.cs Mon Jan 7 10:47:40 2008
@@ -116,11 +116,11 @@
return img;
}
- public static Gtk.Image create_dot_image(int r, int g, int b, int width, int height)
+ public static Gtk.Image create_dot_image(int r, int g, int b, int a, int width, int height)
{
Cairo.ImageSurface surface = new Cairo.ImageSurface(Cairo.Format.ARGB32, width, height);
Cairo.Context context = new Context(surface);
- draw(context, width, height, new Cairo.Color(((double)r)/255, ((double)g)/255, ((double)b)/255));
+ draw(context, width, height, new Cairo.Color(((double)r)/255, ((double)g)/255, ((double)b)/255, ((double)a)/255));
surface.WriteToPng("/tmp/nemo_cairo.png");
Gtk.Image img = new Gtk.Image("/tmp/nemo_cairo.png");
System.IO.File.Delete("/tmp/nemo_cairo.png");
Modified: trunk/gtk/Common.cs
==============================================================================
--- trunk/gtk/Common.cs (original)
+++ trunk/gtk/Common.cs Mon Jan 7 10:47:40 2008
@@ -111,12 +111,15 @@
GtkCommon.set_foreground_color(l, new Gdk.Color(label.metalabel.color.r, label.metalabel.color.g, label.metalabel.color.b));
label_item.Add(l);
+ label_item.Image = CairoDrawing.create_dot_image(0, 0, 0, 0, 14, 14);
+
label_item.Activated += delegate { item.make_label(label); };
categories_menu.Add(label_item);
}
else
{
ImageMenuItem label_item = new ImageMenuItem();
+
Gtk.Label l = new Gtk.Label(label.metalabel.label);
l.SetAlignment(0f, 0.5f);
GtkCommon.set_foreground_color(l, new Gdk.Color(label.metalabel.color.r, label.metalabel.color.g, label.metalabel.color.b));
Modified: trunk/gtk/Label.cs
==============================================================================
--- trunk/gtk/Label.cs (original)
+++ trunk/gtk/Label.cs Mon Jan 7 10:47:40 2008
@@ -67,7 +67,7 @@
public Gtk.Image dot()
{
- return CairoDrawing.create_dot_image(metalabel.color.r, metalabel.color.g, metalabel.color.b, 14, 14);
+ return CairoDrawing.create_dot_image(metalabel.color.r, metalabel.color.g, metalabel.color.b, 255, 14, 14);
}
public UserLabel(MetaLabel label)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]