diff options
author | Benjamin Otte <otte@redhat.com> | 2014-09-06 06:41:05 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-09-07 01:57:10 +0200 |
commit | 9a8a4a8b1479d004d1fb65a9ac6714318129bdad (patch) | |
tree | 6c2a7e741eaa589f23bd506b2a5c9f75179cebe5 /testsuite | |
parent | 95959ef470e00e0f0c2f6a3684c3693cd0fb3df3 (diff) | |
download | gtk+-9a8a4a8b1479d004d1fb65a9ac6714318129bdad.tar.gz |
widget: Don't assume opacity is 100%
... just because there is no style context instantiated yet. Instead,
instantiate a style context during realize() and ask it.
Fixes problems with dim labels not being dimmed on first show.
Testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=735240
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/reftests/Makefile.am | 3 | ||||
-rw-r--r-- | testsuite/reftests/opacity-initial.css | 3 | ||||
-rw-r--r-- | testsuite/reftests/opacity-initial.ref.ui | 11 | ||||
-rw-r--r-- | testsuite/reftests/opacity-initial.ui | 29 |
4 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/reftests/Makefile.am b/testsuite/reftests/Makefile.am index 5f84f8c81f..0853a007f5 100644 --- a/testsuite/reftests/Makefile.am +++ b/testsuite/reftests/Makefile.am @@ -314,6 +314,9 @@ testdata = \ opacity.css \ opacity.ui \ opacity.ref.ui \ + opacity-initial.css \ + opacity-initial.ref.ui \ + opacity-initial.ui \ overlay-no-main-widget.ref.ui \ overlay-no-main-widget.ui \ paned-undersized.css \ diff --git a/testsuite/reftests/opacity-initial.css b/testsuite/reftests/opacity-initial.css new file mode 100644 index 0000000000..611a8cd421 --- /dev/null +++ b/testsuite/reftests/opacity-initial.css @@ -0,0 +1,3 @@ +GtkLabel { + opacity: 0; +} diff --git a/testsuite/reftests/opacity-initial.ref.ui b/testsuite/reftests/opacity-initial.ref.ui new file mode 100644 index 0000000000..12403517bd --- /dev/null +++ b/testsuite/reftests/opacity-initial.ref.ui @@ -0,0 +1,11 @@ +<?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="width_request">200</property> + <property name="height_request">100</property> + <property name="can_focus">False</property> + <property name="type">popup</property> + </object> +</interface> diff --git a/testsuite/reftests/opacity-initial.ui b/testsuite/reftests/opacity-initial.ui new file mode 100644 index 0000000000..9e02798575 --- /dev/null +++ b/testsuite/reftests/opacity-initial.ui @@ -0,0 +1,29 @@ +<?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="width_request">200</property> + <property name="height_request">100</property> + <property name="can_focus">False</property> + <property name="type">popup</property> + <child> + <object class="GtkOverlay" id="overlay1"> + <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">I'm the invisible label. +Incredible how you can +see right through me.</property> + </object> + </child> + </object> + </child> + </object> +</interface> |