Commit a4f12966 authored by Lucas Manika Koeb's avatar Lucas Manika Koeb
Browse files

greeter: The right arrow now turns yellow when clicked


Signed-off-by: default avatarLucas Manika Koeb <lmk08@c3sl.ufpr.br>
parent dc7f3398
......@@ -35,6 +35,7 @@ public class DashEntry : Gtk.Entry, Fadable
changed.connect (changed_cb);
icon_press.connect (icon_press_cb);
activate.connect (clicked_cb);
override_font (Pango.FontDescription.from_string ("Ubuntu 14"));
}
......@@ -80,18 +81,32 @@ public class DashEntry : Gtk.Entry, Fadable
enable_arrow (get_text_length () != 0);
}
private void clicked_cb ()
{
enable_arrow_clicked ();
}
private void icon_press_cb ()
{
activate ();
}
private void enable_arrow_clicked ()
{
var file = File.new_for_path ("/usr/share/unity-greeter/arrow_right2.png");
var icon = new FileIcon (file);
set_icon_from_gicon (Gtk.EntryIconPosition.SECONDARY, icon);
}
private void enable_arrow (bool enabled)
{
if (enabled)
{
var file = File.new_for_path (Path.build_filename (Config.PKGDATADIR, "arrow_right.png", null));
//var file = File.new_for_path (Path.build_filename (Config.PKGDATADIR, "arrow_right.png", null));
var file = File.new_for_path ("/usr/share/unity-greeter/arrow_right.png");
var icon = new FileIcon (file);
set_icon_from_gicon (Gtk.EntryIconPosition.SECONDARY, icon);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment