Bläddra i källkod

Layout margin and spacing settable from XML attributes.

Neal Wilson 11 år sedan
förälder
incheckning
3078954beb
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. 9
    0
      src/typica.w

+ 9
- 0
src/typica.w Visa fil

@@ -4181,6 +4181,15 @@ if(element.hasAttribute("id"))
4181 4181
 {
4182 4182
 	layout->setObjectName(element.attribute("id"));
4183 4183
 }
4184
+if(element.hasAttribute("spacing"))
4185
+{
4186
+	layout->setSpacing(element.attribute("spacing").toInt());
4187
+}
4188
+if(element.hasAttribute("margin"))
4189
+{
4190
+	int m = element.attribute("margin").toInt();
4191
+	layout->setContentsMargins(m, m, m, m);
4192
+}
4184 4193
 
4185 4194
 @ Stacked layouts are a bit different from the other types. A stacked layout has
4186 4195
 an arbitrary number of {\tt <page>} children which are just a |QWidget| which

Laddar…
Avbryt
Spara