From affa6a7080efc157b51e83933343c69fd1e32ec7 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 29 Apr 2016 12:20:41 -0400 Subject: [PATCH] Converted QueueRelayout to MinimumSizeChanged. --- windows/button.cpp | 2 +- windows/checkbox.cpp | 2 +- windows/child.cpp | 4 ++-- windows/fontbutton.cpp | 2 +- windows/group.cpp | 2 +- windows/label.cpp | 2 +- windows/radiobuttons.cpp | 2 +- windows/window.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/windows/button.cpp b/windows/button.cpp index 1556fdd1..37e31574 100644 --- a/windows/button.cpp +++ b/windows/button.cpp @@ -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) diff --git a/windows/checkbox.cpp b/windows/checkbox.cpp index e874bac7..ac25f88b 100644 --- a/windows/checkbox.cpp +++ b/windows/checkbox.cpp @@ -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) diff --git a/windows/child.cpp b/windows/child.cpp index 9d7d0b84..6798df67 100644 --- a/windows/child.cpp +++ b/windows/child.cpp @@ -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) diff --git a/windows/fontbutton.cpp b/windows/fontbutton.cpp index aada19c3..43b17fb5 100644 --- a/windows/fontbutton.cpp +++ b/windows/fontbutton.cpp @@ -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) diff --git a/windows/group.cpp b/windows/group.cpp index 37d6b858..87ef0eec 100644 --- a/windows/group.cpp +++ b/windows/group.cpp @@ -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) diff --git a/windows/label.cpp b/windows/label.cpp index 7239996e..8219ded8 100644 --- a/windows/label.cpp +++ b/windows/label.cpp @@ -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) diff --git a/windows/radiobuttons.cpp b/windows/radiobuttons.cpp index b02972b0..bac1998d 100644 --- a/windows/radiobuttons.cpp +++ b/windows/radiobuttons.cpp @@ -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) diff --git a/windows/window.cpp b/windows/window.cpp index 6e466572..a33c76f1 100644 --- a/windows/window.cpp +++ b/windows/window.cpp @@ -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");