[gnome-photos] edit-palette, edit-palette-row, Add a vertical accordian effect
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] edit-palette, edit-palette-row, Add a vertical accordian effect
- Date: Wed, 9 Dec 2015 16:04:53 +0000 (UTC)
commit b2817899d8e7ef80d14fbf08424e58aaff081a9e
Author: Umang Jain <mailumangjain gmail com>
Date: Thu Dec 3 22:21:35 2015 +0530
edit-palette, edit-palette-row, Add a vertical accordian effect
... to reveal the rows when the palette slides in.
https://bugzilla.gnome.org/show_bug.cgi?id=758554
src/photos-edit-palette-row.c | 14 +++++++++++++-
src/photos-edit-palette-row.h | 3 +++
src/photos-edit-palette.c | 1 +
3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-edit-palette-row.c b/src/photos-edit-palette-row.c
index 66ab162..2d193d5 100644
--- a/src/photos-edit-palette-row.c
+++ b/src/photos-edit-palette-row.c
@@ -1,6 +1,7 @@
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2015 Red Hat, Inc.
+ * Copyright © 2015 Umang Jain
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,6 +29,7 @@ struct _PhotosEditPaletteRow
{
GtkListBoxRow parent_instance;
GtkWidget *details_revealer;
+ GtkWidget *row_revealer;
PhotosTool *tool;
GtkSizeGroup *size_group;
};
@@ -63,13 +65,17 @@ photos_edit_palette_row_constructed (GObject *object)
G_OBJECT_CLASS (photos_edit_palette_row_parent_class)->constructed (object);
+ self->row_revealer = gtk_revealer_new();
+ gtk_revealer_set_transition_type (GTK_REVEALER (self->row_revealer),
GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
+ gtk_container_add (GTK_CONTAINER (self), self->row_revealer);
+
grid0 = gtk_grid_new ();
gtk_widget_set_margin_bottom (grid0, 6);
gtk_widget_set_margin_start (grid0, 18);
gtk_widget_set_margin_end (grid0, 18);
gtk_widget_set_margin_top (grid0, 6);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid0), GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (self), grid0);
+ gtk_container_add (GTK_CONTAINER (self->row_revealer), grid0);
grid1 = gtk_grid_new ();
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid1), GTK_ORIENTATION_HORIZONTAL);
@@ -219,3 +225,9 @@ photos_edit_palette_row_show_details (PhotosEditPaletteRow *self)
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (self), FALSE);
gtk_revealer_set_reveal_child (GTK_REVEALER (self->details_revealer), TRUE);
}
+
+void
+photos_edit_palette_row_show (PhotosEditPaletteRow *self)
+{
+ gtk_revealer_set_reveal_child (GTK_REVEALER (self->row_revealer), TRUE);
+}
diff --git a/src/photos-edit-palette-row.h b/src/photos-edit-palette-row.h
index 1d42af4..8ba69d6 100644
--- a/src/photos-edit-palette-row.h
+++ b/src/photos-edit-palette-row.h
@@ -1,6 +1,7 @@
/*
* Photos - access, organize and share your photos on GNOME
* Copyright © 2015 Red Hat, Inc.
+ * Copyright © 2015 Umang Jain
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -50,6 +51,8 @@ void photos_edit_palette_row_hide_details (PhotosEdi
void photos_edit_palette_row_show_details (PhotosEditPaletteRow *self);
+void photos_edit_palette_row_show (PhotosEditPaletteRow *self);
+
G_END_DECLS
#endif /* PHOTOS_EDIT_PALETTE_ROW_H */
diff --git a/src/photos-edit-palette.c b/src/photos-edit-palette.c
index 45f9726..e5a5bc6 100644
--- a/src/photos-edit-palette.c
+++ b/src/photos-edit-palette.c
@@ -221,6 +221,7 @@ photos_edit_palette_show (PhotosEditPalette *self)
row = photos_edit_palette_row_new (tool, size_group);
gtk_container_add (GTK_CONTAINER (self), row);
+ photos_edit_palette_row_show (PHOTOS_EDIT_PALETTE_ROW (row));
g_signal_connect_swapped (tool, "hide-requested", G_CALLBACK (photos_edit_palette_hide_requested),
self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]