diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-06 15:58:12 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-06 16:57:11 -0400 |
commit | 208ba9bb50227a2681515b9847c651dd943c7127 (patch) | |
tree | 1dc15bc92df305377f0b065963b31f865f6009af /tests/testheightforwidth.c | |
parent | c9579f3ca480d931bbdd359091311710bd113cc3 (diff) | |
download | gtk+-208ba9bb50227a2681515b9847c651dd943c7127.tar.gz |
Make GtkFrame allocate its label considering natural size requests
Also like the GtkExpander, the label widget is allocated the minimum
height for its allocated width and the remaining space is given to
the child, test case included.
Diffstat (limited to 'tests/testheightforwidth.c')
-rw-r--r-- | tests/testheightforwidth.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/testheightforwidth.c b/tests/testheightforwidth.c index e59d3bb6f7..f784864b6b 100644 --- a/tests/testheightforwidth.c +++ b/tests/testheightforwidth.c @@ -615,6 +615,49 @@ TestInterface interfaces[] = { "</interface>", NULL }, + + { + "Wrapping Frame Label", + "This test demonstrates how the frame label can fill to its natural width " + "and also trade height for width.", + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<interface>" + " <requires lib=\"gtk+\" version=\"2.20\"/>" + " <!-- interface-naming-policy project-wide -->" + " <object class=\"GtkWindow\" id=\"window\">" + " <property name=\"default_width\">400</property>" + " <property name=\"default_height\">150</property>" + " <child>" + " <object class=\"GtkFrame\" id=\"frame1\">" + " <property name=\"visible\">True</property>" + " <property name=\"border_width\">8</property>" + " <property name=\"label_xalign\">0</property>" + " <child>" + " <object class=\"GtkAlignment\" id=\"alignment1\">" + " <property name=\"visible\">True</property>" + " <property name=\"left_padding\">12</property>" + " <child>" + " <object class=\"GtkLabel\" id=\"label2\">" + " <property name=\"visible\">True</property>" + " <property name=\"label\" translatable=\"yes\">some content</property>" + " </object>" + " </child>" + " </object>" + " </child>" + " <child type=\"label\">" + " <object class=\"GtkLabel\" id=\"label1\">" + " <property name=\"visible\">True</property>" + " <property name=\"label\" translatable=\"yes\">A frame label that's a little long and wraps</property>" + " <property name=\"use_markup\">True</property>" + " <property name=\"wrap\">True</property>" + " </object>" + " </child>" + " </object>" + " </child>" + " </object>" + "</interface>", + NULL + }, }; |