diff options
author | Benjamin Otte <otte@redhat.com> | 2014-09-07 01:52:45 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-09-07 01:57:09 +0200 |
commit | 95959ef470e00e0f0c2f6a3684c3693cd0fb3df3 (patch) | |
tree | d855407d4f8723bb7c20261bfb5219f1b5944a88 /testsuite/reftests | |
parent | c849b8edd664b7e84b42a61e95dad9f8e0b287f7 (diff) | |
download | gtk+-95959ef470e00e0f0c2f6a3684c3693cd0fb3df3.tar.gz |
overlay: Handle overlays when no main widget exists
Just pretend that the main widget is an empty widget the size of the
overlay.
Makes it possible to write testcases where no size requests are run on
overlay widgets before size_allocate() is called.
Testcase included.
Diffstat (limited to 'testsuite/reftests')
-rw-r--r-- | testsuite/reftests/Makefile.am | 2 | ||||
-rw-r--r-- | testsuite/reftests/overlay-no-main-widget.ref.ui | 33 | ||||
-rw-r--r-- | testsuite/reftests/overlay-no-main-widget.ui | 26 |
3 files changed, 61 insertions, 0 deletions
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am index 19c1a5e2fb..5f84f8c81f 100644 --- a/testsuite/reftests/Makefile.am +++ b/testsuite/reftests/Makefile.am @@ -314,6 +314,8 @@ testdata = \ opacity.css \ opacity.ui \ opacity.ref.ui \ + overlay-no-main-widget.ref.ui \ + overlay-no-main-widget.ui \ paned-undersized.css \ paned-undersized.ref.ui \ paned-undersized.ui \ diff --git a/testsuite/reftests/overlay-no-main-widget.ref.ui b/testsuite/reftests/overlay-no-main-widget.ref.ui new file mode 100644 index 0000000000..a895631761 --- /dev/null +++ b/testsuite/reftests/overlay-no-main-widget.ref.ui @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.1 --> +<interface> + <requires lib="gtk+" version="3.12"/> + <object class="GtkWindow" id="window1"> + <property name="can_focus">False</property> + <child> + <object class="GtkOverlay" id="overlay1"> + <property name="width_request">100</property> + <property name="height_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + </child> + <child type="overlay"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">VISIBLE</property> + </object> + </child> + </object> + </child> + </object> +</interface> diff --git a/testsuite/reftests/overlay-no-main-widget.ui b/testsuite/reftests/overlay-no-main-widget.ui new file mode 100644 index 0000000000..08abb83bd0 --- /dev/null +++ b/testsuite/reftests/overlay-no-main-widget.ui @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.1 --> +<interface> + <requires lib="gtk+" version="3.12"/> + <object class="GtkWindow" id="window1"> + <property name="can_focus">False</property> + <child> + <object class="GtkOverlay" id="overlay1"> + <property name="width_request">100</property> + <property name="height_request">100</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <placeholder/> + </child> + <child type="overlay"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">VISIBLE</property> + </object> + </child> + </object> + </child> + </object> +</interface> |