More work.

This commit is contained in:
Pietro Gagliardi 2016-05-29 19:01:48 -04:00
parent efc1e55e58
commit 0738eca6e4
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;