Browse Source

Layout margin and spacing settable from XML attributes.

Neal Wilson 11 years ago
parent
commit
3078954beb
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/typica.w

+ 9
- 0
src/typica.w View File

4181
 {
4181
 {
4182
 	layout->setObjectName(element.attribute("id"));
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
 @ Stacked layouts are a bit different from the other types. A stacked layout has
4194
 @ Stacked layouts are a bit different from the other types. A stacked layout has
4186
 an arbitrary number of {\tt <page>} children which are just a |QWidget| which
4195
 an arbitrary number of {\tt <page>} children which are just a |QWidget| which

Loading…
Cancel
Save