ui/winui/window.cpp

branch
newapi
changeset 206
7ebc5a747c6f
parent 205
b1ac0dd1d38b
child 209
770b3548906c
equal deleted inserted replaced
205:b1ac0dd1d38b 206:7ebc5a747c6f
91 mb.VerticalAlignment(VerticalAlignment::Top); 91 mb.VerticalAlignment(VerticalAlignment::Top);
92 obj->container->Add(mb, false); 92 obj->container->Add(mb, false);
93 } 93 }
94 94
95 if (uic_toolbar_isenabled()) { 95 if (uic_toolbar_isenabled()) {
96 // create/add toolbar 96 // create commandbar
97 CommandBar toolbar = ui_create_toolbar(); 97 CommandBar toolbar = ui_create_toolbar(obj);
98 toolbar.VerticalAlignment(VerticalAlignment::Top); 98 // wrap the commandbar in a stackpanel, because we
99 obj->container->Add(toolbar, false); 99 // don't want to fill the horizontal space
100 StackPanel toolbar_panel = StackPanel();
101 toolbar_panel.Orientation(Orientation::Horizontal);
102 toolbar_panel.Children().Append(toolbar);
103
104 toolbar_panel.VerticalAlignment(VerticalAlignment::Top);
105 obj->container->Add(toolbar_panel, false);
100 } 106 }
101 107
102 obj->window = window_data; 108 obj->window = window_data;
103 109
104 return obj; 110 return obj;

mercurial