Explorar el Código

Layout margin and spacing settable from XML attributes.

Neal Wilson hace 12 años
padre
commit
3078954beb
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9
    0
      src/typica.w

+ 9
- 0
src/typica.w Ver fichero

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…
Cancelar
Guardar