"Fixed" box padded application bug on Windows; more related TODOs.
This commit is contained in:
parent
a944e32f4e
commit
bb617883d1
5
TODO.md
5
TODO.md
|
@ -62,6 +62,11 @@
|
|||
- whenever a list of things is destroyed, each successive item must be removed as it is destroyed, otherwise we might wind up in a situation where we access items after they're freed
|
||||
- make the name of the variable to refer to a single tab page consistent (already decided to make them all `page`)
|
||||
- make sure uiEntryOnChanged() is not triggered when calling uiEntrySetText()
|
||||
- clean up windows resizing logic
|
||||
- make it so that only top-level window resizes trigger an update; container resizes do not update
|
||||
- windows resizing logic is simply not comprehensive enough (no null resizes allowed) to do things
|
||||
- we control resizes of all children so we can reliably update after a resize
|
||||
- we already need to do this in uiContainer :/
|
||||
|
||||
ultimately:
|
||||
- add some sort of runtime type checking
|
||||
|
|
3
box.c
3
box.c
|
@ -2,9 +2,6 @@
|
|||
#include "ui.h"
|
||||
#include "uipriv.h"
|
||||
|
||||
// TODO
|
||||
// - horizontal boxes (only) inside vertical boxes (and vice versa) aren't updated on Windows (only) when padded changes until a horizontal (only; vertical) resize
|
||||
|
||||
struct box {
|
||||
uiBox b;
|
||||
void (*baseDestroy)(uiControl *);
|
||||
|
|
|
@ -318,6 +318,9 @@ static void containerResize(uiControl *cc, intmax_t x, intmax_t y, intmax_t widt
|
|||
|
||||
if (MoveWindow(c->hwnd, x, y, width, height, TRUE) == 0)
|
||||
logLastError("error resizing uiContainer in containerResize()");
|
||||
// under some circumstances this might not be sufficient
|
||||
// example: check the Spaced checkbox; inside boxes will have been resized already before they get a chance to update their padded
|
||||
SendMessageW(c->hwnd, msgUpdateChild, 0, 0);
|
||||
}
|
||||
|
||||
static int containerVisible(uiControl *cc)
|
||||
|
|
Loading…
Reference in New Issue