diff --git a/darwin/spinbox.m b/darwin/spinbox.m index 0663e239..30fbc00b 100644 --- a/darwin/spinbox.m +++ b/darwin/spinbox.m @@ -34,6 +34,7 @@ struct uiSpinbox { // TODO test this; we'll probably have to substitute 10_9 static CGFloat stepperYDelta(void) { + // via https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/ if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9) return 0; return -1; diff --git a/doc/drawtext b/doc/drawtext index e16b6c3e..9d377135 100644 --- a/doc/drawtext +++ b/doc/drawtext @@ -9,3 +9,5 @@ font matching is closest match but the search method is OS defined weight names in libui do not necessarily line up with their OS names +uiDrawFontHandle() may not return a unique handle per instance + diff --git a/windows/fontbutton.cpp b/windows/fontbutton.cpp index 22e11abb..c4f841db 100644 --- a/windows/fontbutton.cpp +++ b/windows/fontbutton.cpp @@ -25,8 +25,7 @@ static void updateFontButtonLabel(uiFontButton *b) WCHAR *text; text = fontDialogParamsToString(&(b->params)); - // TODO error check - SendMessageW(b->hwnd, WM_SETTEXT, 0, (LPARAM) text); + setWindowText(text); uiFree(text); // changing the text might necessitate a change in the button's size @@ -94,8 +93,6 @@ uiDrawTextFont *uiFontButtonFont(uiFontButton *b) return mkTextFont(b->params.font, TRUE, b->params.familyName, TRUE, b->params.size); } -// TODO document that the Handle of a Font may not be unique - void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, void *), void *data) { b->onChanged = f;