ui/qt/container.cpp

changeset 110
36f1581b43e2
parent 102
2988f00ed9d6
child 130
212b63dd61be
equal deleted inserted replaced
109:b9808f916687 110:36f1581b43e2
119 alignment = 0; 119 alignment = 0;
120 } else { 120 } else {
121 grid->setRowStretch(y, 0); 121 grid->setRowStretch(y, 0);
122 } 122 }
123 123
124 grid->addWidget(widget, y, x, alignment); 124 int gwidth = layout.gridwidth > 0 ? layout.gridwidth : 1;
125 x++; 125
126 grid->addWidget(widget, y, x, 1, gwidth, alignment);
127 x += gwidth;
126 128
127 ui_reset_layout(layout); 129 ui_reset_layout(layout);
128 current = widget; 130 current = widget;
129 } 131 }
130 132
209 void ui_layout_vexpand(UiObject *obj, UiBool expand) { 211 void ui_layout_vexpand(UiObject *obj, UiBool expand) {
210 UiContainer *ct = uic_get_current_container(obj); 212 UiContainer *ct = uic_get_current_container(obj);
211 ct->layout.vexpand = expand; 213 ct->layout.vexpand = expand;
212 } 214 }
213 215
216 void ui_layout_gridwidth(UiObject *obj, int width) {
217 UiContainer *ct = uic_get_current_container(obj);
218 ct->layout.gridwidth = width;
219 }
220
214 void ui_newline(UiObject *obj) { 221 void ui_newline(UiObject *obj) {
215 UiContainer *ct = uic_get_current_container(obj); 222 UiContainer *ct = uic_get_current_container(obj);
216 ct->layout.newline = TRUE; 223 ct->layout.newline = TRUE;
217 } 224 }

mercurial