[gnome-photos] Improve the alignment of notifications
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Improve the alignment of notifications
- Date: Wed, 6 Apr 2016 10:21:39 +0000 (UTC)
commit 75adfae431507a90999c455d51772b951ce24059
Author: Jonathan Kang <jonathan121537 gmail com>
Date: Thu Mar 24 22:12:02 2016 +0800
Improve the alignment of notifications
Horizontally expand the labels so that there is no gutter at the end
when a narrower notification is stacked with a wider one.
https://bugzilla.gnome.org/show_bug.cgi?id=763292
src/photos-delete-notification.c | 1 +
src/photos-done-notification.c | 1 +
src/photos-export-notification.c | 1 +
src/photos-indexing-notification.c | 2 ++
src/photos-print-notification.c | 1 +
5 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-delete-notification.c b/src/photos-delete-notification.c
index 0c71ff6..1bded45 100644
--- a/src/photos-delete-notification.c
+++ b/src/photos-delete-notification.c
@@ -149,6 +149,7 @@ photos_delete_notification_constructed (GObject *object)
label = gtk_label_new (msg);
gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (label, TRUE);
gtk_container_add (GTK_CONTAINER (self), label);
g_free (msg);
diff --git a/src/photos-done-notification.c b/src/photos-done-notification.c
index 99d12d2..ab494f5 100644
--- a/src/photos-done-notification.c
+++ b/src/photos-done-notification.c
@@ -182,6 +182,7 @@ photos_done_notification_constructed (GObject *object)
label = gtk_label_new (msg);
gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (label, TRUE);
gtk_container_add (GTK_CONTAINER (self), label);
g_free (msg);
diff --git a/src/photos-export-notification.c b/src/photos-export-notification.c
index ff02eda..918a071 100644
--- a/src/photos-export-notification.c
+++ b/src/photos-export-notification.c
@@ -256,6 +256,7 @@ photos_export_notification_constructed (GObject *object)
label = gtk_label_new (msg);
gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (label, TRUE);
gtk_container_add (GTK_CONTAINER (self), label);
g_free (msg);
diff --git a/src/photos-indexing-notification.c b/src/photos-indexing-notification.c
index c7bbcc7..92724c8 100644
--- a/src/photos-indexing-notification.c
+++ b/src/photos-indexing-notification.c
@@ -273,10 +273,12 @@ photos_indexing_notification_init (PhotosIndexingNotification *self)
self->primary_label = gtk_label_new (NULL);
gtk_widget_set_halign (self->primary_label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (self->primary_label, TRUE);
gtk_container_add (GTK_CONTAINER (labels), self->primary_label);
self->secondary_label = gtk_label_new (NULL);
gtk_widget_set_halign (self->secondary_label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (self->secondary_label, TRUE);
context = gtk_widget_get_style_context (self->secondary_label);
gtk_style_context_add_class (context, "dim-label");
gtk_container_add (GTK_CONTAINER (labels), self->secondary_label);
diff --git a/src/photos-print-notification.c b/src/photos-print-notification.c
index 7944c15..d6b6266 100644
--- a/src/photos-print-notification.c
+++ b/src/photos-print-notification.c
@@ -158,6 +158,7 @@ photos_print_notification_init (PhotosPrintNotification *self)
self->status_label = gtk_label_new (NULL);
gtk_widget_set_halign (self->status_label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (self->status_label, TRUE);
gtk_container_add (GTK_CONTAINER (self), self->status_label);
image = gtk_image_new_from_icon_name (PHOTOS_ICON_PROCESS_STOP_SYMBOLIC, GTK_ICON_SIZE_INVALID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]