Converted QueueRelayout to MinimumSizeChanged.

This commit is contained in:
Pietro Gagliardi 2016-04-29 12:20:41 -04:00
parent f16f287b97
commit affa6a7080
8 changed files with 9 additions and 9 deletions

View File

@ -73,7 +73,7 @@ void uiButtonSetText(uiButton *b, const char *text)
{
uiWindowsSetWindowText(b->hwnd, text);
// changing the text might necessitate a change in the button's size
uiWindowsControlQueueRelayout(uiWindowsControl(b));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(b));
}
void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)

View File

@ -59,7 +59,7 @@ void uiCheckboxSetText(uiCheckbox *c, const char *text)
{
uiWindowsSetWindowText(c->hwnd, text);
// changing the text might necessitate a change in the checkbox's size
uiWindowsControlQueueRelayout(uiWindowsControl(c));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(c));
}
void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), void *data)

View File

@ -112,7 +112,7 @@ void childRelayout(struct child *c, intmax_t x, intmax_t y, intmax_t width, intm
void childQueueRelayout(struct child *c)
{
uiWindowsControlQueueRelayout(uiWindowsControl(c->c));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(c->c));
}
int childVisible(struct child *c)
@ -151,7 +151,7 @@ int childMargined(struct child *c)
void childSetMargined(struct child *c, int margined)
{
c->margined = margined;
uiWindowsControlQueueRelayout(uiWindowsControl(c->c));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(c->c));
}
int childFlag(struct child *c)

View File

@ -33,7 +33,7 @@ static void updateFontButtonLabel(uiFontButton *b)
uiFree(text);
// changing the text might necessitate a change in the button's size
uiWindowsControlQueueRelayout(uiWindowsControl(b));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(b));
}
static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lResult)

View File

@ -149,7 +149,7 @@ void uiGroupSetTitle(uiGroup *g, const char *text)
{
uiWindowsSetWindowText(g->hwnd, text);
// changing the text might necessitate a change in the groupbox's size
uiWindowsControlQueueRelayout(uiWindowsControl(g));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(g));
}
void uiGroupSetChild(uiGroup *g, uiControl *child)

View File

@ -30,7 +30,7 @@ void uiLabelSetText(uiLabel *l, const char *text)
{
uiWindowsSetWindowText(l->hwnd, text);
// changing the text might necessitate a change in the label's size
uiWindowsControlQueueRelayout(uiWindowsControl(l));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(l));
}
uiLabel *uiNewLabel(const char *text)

View File

@ -135,7 +135,7 @@ void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
uiWindowsRegisterWM_COMMANDHandler(hwnd, onWM_COMMAND, uiControl(r));
r->hwnds->push_back(hwnd);
redoControlIDsZOrder(r);
uiWindowsControlQueueRelayout(uiWindowsControl(r));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(r));
}
uiRadioButtons *uiNewRadioButtons(void)

View File

@ -192,7 +192,7 @@ static void uiWindowShow(uiControl *c)
}
w->shownOnce = TRUE;
// make sure the child is the correct size
uiWindowsControlQueueRelayout(uiWindowsControl(w));
uiWindowsControlMinimumSizeChanged(uiWindowsControl(w));
ShowWindow(w->hwnd, nCmdShow);
if (UpdateWindow(w->hwnd) == 0)
logLastError(L"error calling UpdateWindow() after showing uiWindow for the first time");