[gnome-contacts] Center: remove xalign.
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Center: remove xalign.
- Date: Mon, 22 Jan 2018 21:06:10 +0000 (UTC)
commit a3014aee8d9e7bda52196172a2528d15f261c85b
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Jan 22 22:05:17 2018 +0100
Center: remove xalign.
It's not used (and shouldn't be, we have halign for that).
src/contacts-contact-pane.vala | 1 -
src/contacts-utils.vala | 7 +------
2 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index f561fef..3f6a443 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -195,7 +195,6 @@ public class Contacts.ContactPane : Stack {
var hcenter = new Center ();
hcenter.max_width = 600;
- hcenter.xalign = 0.0;
hcenter.show ();
hcenter.add (this.sheet);
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index f3ec1a9..a8042a1 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -71,11 +71,6 @@ namespace Contacts {
public class Center : Bin {
public int max_width { get; set; }
- public double xalign { get; set; }
-
- public Center () {
- this.xalign = 0.5;
- }
public override void get_preferred_height (out int minimum_height, out int natural_height) {
var child = get_child ();
@@ -112,7 +107,7 @@ public class Center : Bin {
new_alloc = allocation;
if (allocation.width > this.max_width) {
new_alloc.width = this.max_width;
- new_alloc.x = (int) ((allocation.width - this.max_width) * this.xalign) + allocation.x;
+ new_alloc.x = allocation.x;
}
var child = get_child ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]