diff --git a/common/matrix.c b/common/matrix.c index 7af2eb07..ce802d3c 100644 --- a/common/matrix.c +++ b/common/matrix.c @@ -3,7 +3,7 @@ #include "../ui.h" #include "uipriv.h" -void setIdentity(uiDrawMatrix *m) +void uiDrawMatrixSetIdentity(uiDrawMatrix *m) { m->M11 = 1; m->M12 = 0; diff --git a/common/uipriv.h b/common/uipriv.h index c8b6b6f0..673f7a36 100644 --- a/common/uipriv.h +++ b/common/uipriv.h @@ -40,7 +40,6 @@ extern void clickCounterReset(clickCounter *); extern int fromScancode(uintptr_t, uiAreaKeyEvent *); // matrix.c -extern void setIdentity(uiDrawMatrix *); extern void fallbackSkew(uiDrawMatrix *, double, double, double, double); extern void fallbackTranslate(uiDrawMatrix *, double, double); extern void scaleCenter(double, double, double *, double *); diff --git a/darwin/button.m b/darwin/button.m index 01ba55f8..be45dba9 100644 --- a/darwin/button.m +++ b/darwin/button.m @@ -76,8 +76,6 @@ char *uiButtonText(uiButton *b) void uiButtonSetText(uiButton *b, const char *text) { [b->button setTitle:toNSString(text)]; - // this may result in the size of the button changing - uiDarwinControlTriggerRelayout(uiDarwinControl(b)); } void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data) diff --git a/darwin/checkbox.m b/darwin/checkbox.m index 73aab165..fea82abb 100644 --- a/darwin/checkbox.m +++ b/darwin/checkbox.m @@ -1,8 +1,6 @@ // 14 august 2015 #import "uipriv_darwin.h" -// TODO the intrinsic height of this seems to be wacky - struct uiCheckbox { uiDarwinControl c; NSButton *button; @@ -78,10 +76,6 @@ char *uiCheckboxText(uiCheckbox *c) void uiCheckboxSetText(uiCheckbox *c, const char *text) { [c->button setTitle:toNSString(text)]; - // this may result in the size of the checkbox changing - // TODO something somewhere is causing this to corrupt some memory so that, for instance, page7b's mouseExited: never triggers on 10.11; figure out what - // TODO is this related to map-related crashes? - uiDarwinControlTriggerRelayout(uiDarwinControl(c)); } void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *, void *), void *data) diff --git a/darwin/draw.m b/darwin/draw.m index c94c073b..a147283c 100644 --- a/darwin/draw.m +++ b/darwin/draw.m @@ -312,12 +312,6 @@ static void c2m(CGAffineTransform *c, uiDrawMatrix *m) m->M32 = c->ty; } -// TODO get rid of the separate setIdentity() -void uiDrawMatrixSetIdentity(uiDrawMatrix *m) -{ - setIdentity(m); -} - void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y) { CGAffineTransform c; diff --git a/darwin/group.m b/darwin/group.m index 6a2cbe62..e20171d4 100644 --- a/darwin/group.m +++ b/darwin/group.m @@ -127,8 +127,6 @@ char *uiGroupTitle(uiGroup *g) void uiGroupSetTitle(uiGroup *g, const char *title) { [g->box setTitle:toNSString(title)]; - // changing the text might necessitate a change in the groupbox's size - uiDarwinControlTriggerRelayout(uiDarwinControl(g)); } void uiGroupSetChild(uiGroup *g, uiControl *child) diff --git a/darwin/label.m b/darwin/label.m index 3e90a5f8..e2b9d540 100644 --- a/darwin/label.m +++ b/darwin/label.m @@ -16,8 +16,6 @@ char *uiLabelText(uiLabel *l) void uiLabelSetText(uiLabel *l, const char *text) { [l->textfield setStringValue:toNSString(text)]; - // changing the text might necessitate a change in the label's size - uiDarwinControlTriggerRelayout(uiDarwinControl(l)); } uiLabel *uiNewLabel(const char *text) diff --git a/darwin/radiobuttons.m b/darwin/radiobuttons.m index 633c1494..59218ad8 100644 --- a/darwin/radiobuttons.m +++ b/darwin/radiobuttons.m @@ -34,8 +34,6 @@ void uiRadioButtonsAppend(uiRadioButtons *r, const char *text) [r->matrix setAllowsEmptySelection:YES]; [r->matrix selectCellAtRow:prevSelection column:0]; [r->matrix setAllowsEmptySelection:NO]; - - uiDarwinControlTriggerRelayout(uiDarwinControl(r)); } uiRadioButtons *uiNewRadioButtons(void) diff --git a/darwin/uipriv_darwin.h b/darwin/uipriv_darwin.h index 028ae8a2..effbfbd4 100644 --- a/darwin/uipriv_darwin.h +++ b/darwin/uipriv_darwin.h @@ -106,6 +106,3 @@ extern void doDrawText(CGContextRef c, CGFloat cheight, double x, double y, uiDr // fontbutton.m extern BOOL fontButtonInhibitSendAction(SEL sel, id from, id to); extern BOOL fontButtonOverrideTargetForAction(SEL sel, id from, id to, id *override); - -// MASSIVE TODO -#define uiDarwinControlTriggerRelayout(...) diff --git a/unix/drawmatrix.c b/unix/drawmatrix.c index 815caf49..807b60d9 100644 --- a/unix/drawmatrix.c +++ b/unix/drawmatrix.c @@ -22,11 +22,6 @@ static void c2m(cairo_matrix_t *c, uiDrawMatrix *m) m->M32 = c->y0; } -void uiDrawMatrixSetIdentity(uiDrawMatrix *m) -{ - setIdentity(m); -} - void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y) { cairo_matrix_t c; diff --git a/windows/drawmatrix.cpp b/windows/drawmatrix.cpp index e2f29d1d..807b41ad 100644 --- a/windows/drawmatrix.cpp +++ b/windows/drawmatrix.cpp @@ -22,11 +22,6 @@ static void d2m(D2D1_MATRIX_3X2_F *d, uiDrawMatrix *m) m->M32 = d->_32; } -void uiDrawMatrixSetIdentity(uiDrawMatrix *m) -{ - setIdentity(m); -} - void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y) { D2D1_MATRIX_3X2_F dm;