[gnome-mines/wip/theming-support] Added theme navigation buttons
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines/wip/theming-support] Added theme navigation buttons
- Date: Sun, 4 Jan 2015 14:37:53 +0000 (UTC)
commit da6b525074b87bde5a56bd8ae531e6b6c02dce20
Author: Robert Roth <robert roth off gmail com>
Date: Sun Jan 4 16:37:24 2015 +0200
Added theme navigation buttons
data/gnome-mines.css | 5 +++++
src/theme-selector-dialog.vala | 23 ++++++++++++++++++++---
2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/data/gnome-mines.css b/data/gnome-mines.css
index ff0d6fa..3e57f72 100644
--- a/data/gnome-mines.css
+++ b/data/gnome-mines.css
@@ -9,3 +9,8 @@
background-color: shade(#babdb6,1.1);
}
+.navigation {
+ border-radius:16px;
+ background-color:alpha(#888a85, 0.6);
+ background-image:none;
+}
diff --git a/src/theme-selector-dialog.vala b/src/theme-selector-dialog.vala
index 32a12ee..cb91c79 100644
--- a/src/theme-selector-dialog.vala
+++ b/src/theme-selector-dialog.vala
@@ -33,11 +33,27 @@ public class ThemeSelectorDialog : Gtk.Dialog
public ThemeSelectorDialog ( )
{
- set_default_size (300, 332);
+ set_default_size (360, 300);
title = _("Select theme");
+
+ var overlay = new Gtk.Overlay ();
var frame = new Gtk.AspectFrame (null, 0.5f, 0.5f, 1.0f, false);
frame.border_width = 6;
- get_content_area ().pack_start (frame, true, true, 0);
+ get_content_area ().pack_start (overlay, true, true, 0);
+
+ var previous = new Gtk.Image.from_icon_name ("go-previous", Gtk.IconSize.DND);
+ previous.show ();
+ previous.valign = Gtk.Align.CENTER;
+ previous.halign = Gtk.Align.START;
+ previous.get_style_context ().add_class ("navigation");
+ overlay.add_overlay (previous);
+
+ var next = new Gtk.Image.from_icon_name ("go-next", Gtk.IconSize.DND);
+ next.show ();
+ next.valign = Gtk.Align.CENTER;
+ next.halign = Gtk.Align.END;
+ next.get_style_context ().add_class ("navigation");
+ overlay.add_overlay (next);
var settings = new Settings ("org.gnome.mines");
settings.delay ();
@@ -45,7 +61,8 @@ public class ThemeSelectorDialog : Gtk.Dialog
var view = new MinefieldView (settings);
view.minefield = new PreviewField ();
frame.add (view);
- frame.show_all ();
+ overlay.add (frame);
+ overlay.show_all ();
reveal_nonmines (view);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]