Skip to content

Commit

Permalink
Merge pull request libui-ng#236 from szanni/fix-qa-layout
Browse files Browse the repository at this point in the history
qa: Fix layout.
  • Loading branch information
cody271 authored Nov 3, 2023
2 parents eab5d90 + 599ad6f commit 8b2f7dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
6 changes: 5 additions & 1 deletion test/qa/qa.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
uiControl* qaMakeGuide(uiControl *c, const char *text)
{
uiBox *hbox;
uiBox *vbox;
uiMultilineEntry *guide;

hbox = uiNewHorizontalBox();
uiBoxSetPadded(hbox, 1);
uiBoxAppend(hbox, c, 1);

vbox = uiNewVerticalBox();
uiBoxAppend(vbox, c, 0);
uiBoxAppend(hbox, uiControl(vbox), 1);

guide = uiNewMultilineEntry();
uiMultilineEntrySetText(guide, text);
Expand Down
13 changes: 1 addition & 12 deletions test/qa/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,11 @@ static int onClosing(uiWindow *w, void *data)
static uiWindow* windowNew(uiControl *child, const char* (*guide)(void))
{
uiWindow *w;
uiBox *box;
uiMultilineEntry *g;

box = uiNewHorizontalBox();

g = uiNewMultilineEntry();
uiMultilineEntrySetText(g, guide());
uiMultilineEntrySetReadOnly(g, 1);

uiBoxAppend(box, child, 1);
uiBoxAppend(box, uiControl(g), 1);

w = uiNewWindow("Quality Assurance", QA_WINDOW_WIDTH, QA_WINDOW_HEIGHT, 0);
uiWindowOnClosing(w, onClosing, NULL);

uiWindowSetChild(w, uiControl(box));
uiWindowSetChild(w, qaMakeGuide(child, guide()));
uiControlShow(uiControl(w));

return w;
Expand Down

0 comments on commit 8b2f7dc

Please sign in to comment.