[gtk+/wip/matthiasc/fancy-overlay] Add a second button to the test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/fancy-overlay] Add a second button to the test
- Date: Sun, 3 Sep 2017 12:58:00 +0000 (UTC)
commit 85ea2044bbe29e80b592bbcc4dc8f56e6a64b6ca
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Sep 3 08:57:20 2017 -0400
Add a second button to the test
Just to show that it works with more than one.
tests/testoverlay.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/tests/testoverlay.c b/tests/testoverlay.c
index 041c22e..a29b82f 100644
--- a/tests/testoverlay.c
+++ b/tests/testoverlay.c
@@ -563,6 +563,18 @@ test_effect (void)
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), button);
gtk_container_child_set (GTK_CONTAINER (overlay), button, "blur", 5.0, NULL);
+ button = gtk_button_new_with_label ("Maybe this one?");
+ label = gtk_bin_get_child (GTK_BIN (button));
+ g_object_set (label, "margin", 50, NULL);
+
+ gtk_widget_set_opacity (button, 0.7);
+ gtk_widget_set_halign (button, GTK_ALIGN_FILL);
+ gtk_widget_set_valign (button, GTK_ALIGN_END);
+
+ gtk_overlay_add_overlay (GTK_OVERLAY (overlay), button);
+ gtk_container_child_set (GTK_CONTAINER (overlay), button, "blur", 5.0, NULL);
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (overlay), sw);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]