More work.
This commit is contained in:
parent
efc1e55e58
commit
0738eca6e4
|
@ -34,6 +34,7 @@ struct uiSpinbox {
|
||||||
// TODO test this; we'll probably have to substitute 10_9
|
// TODO test this; we'll probably have to substitute 10_9
|
||||||
static CGFloat stepperYDelta(void)
|
static CGFloat stepperYDelta(void)
|
||||||
{
|
{
|
||||||
|
// via https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/
|
||||||
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
|
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
|
||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -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
|
weight names in libui do not necessarily line up with their OS names
|
||||||
|
|
||||||
|
|
||||||
|
uiDrawFontHandle() may not return a unique handle per instance
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,7 @@ static void updateFontButtonLabel(uiFontButton *b)
|
||||||
WCHAR *text;
|
WCHAR *text;
|
||||||
|
|
||||||
text = fontDialogParamsToString(&(b->params));
|
text = fontDialogParamsToString(&(b->params));
|
||||||
// TODO error check
|
setWindowText(text);
|
||||||
SendMessageW(b->hwnd, WM_SETTEXT, 0, (LPARAM) text);
|
|
||||||
uiFree(text);
|
uiFree(text);
|
||||||
|
|
||||||
// changing the text might necessitate a change in the button's size
|
// 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);
|
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)
|
void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, void *), void *data)
|
||||||
{
|
{
|
||||||
b->onChanged = f;
|
b->onChanged = f;
|
||||||
|
|
Loading…
Reference in New Issue