[gnome-boxes] property: Add 'description_alignment' property
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] property: Add 'description_alignment' property
- Date: Thu, 5 Feb 2015 20:49:24 +0000 (UTC)
commit e1f0cfcfeddd167c56dfc4350bece03ba666fa59
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Feb 5 20:45:18 2015 +0000
property: Add 'description_alignment' property
Instead of hardcoding alignment for all descriptions, lets make it
possible for property providers to change it.
src/i-properties-provider.vala | 1 +
src/properties-page-widget.vala | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/i-properties-provider.vala b/src/i-properties-provider.vala
index 17b61a9..b45bb0b 100644
--- a/src/i-properties-provider.vala
+++ b/src/i-properties-provider.vala
@@ -6,6 +6,7 @@ private class Boxes.Property: GLib.Object {
public Gtk.Widget widget { get; construct set; }
public Gtk.Widget? extra_widget { get; construct set; }
public bool reboot_required { get; set; }
+ public Gtk.Align description_alignment { get; set; default = Gtk.Align.END; }
public signal void refresh_properties ();
public signal void flushed ();
diff --git a/src/properties-page-widget.vala b/src/properties-page-widget.vala
index fce2444..4774daa 100644
--- a/src/properties-page-widget.vala
+++ b/src/properties-page-widget.vala
@@ -52,7 +52,7 @@ private class Boxes.PropertiesPageWidget: Gtk.Box {
if (property.description != null) {
var label_name = new Gtk.Label (property.description);
label_name.get_style_context ().add_class ("boxes-property-name-label");
- label_name.halign = Gtk.Align.END;
+ label_name.halign = property.description_alignment;
label_name.hexpand = false;
grid.attach (label_name, 0, current_row, 1, 1);
var widget = property.widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]