-/* $Id: macctrls.c,v 1.35 2003/04/14 22:42:44 ben Exp $ */
+/* $Id: macctrls.c,v 1.38 2003/04/14 23:28:58 ben Exp $ */
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
curstate.width = 160;
panellist.listbox.type = CTRL_LISTBOX;
panellist.listbox.handler = &panellist_handler;
- panellist.listbox.height = 15;
+ panellist.listbox.height = 20;
panellist.listbox.percentwidth = 100;
macctrl_listbox(mcs, window, &curstate, &panellist);
FrameRect(&rect);
InsetRect(&rect, 3, 3);
}
+ EraseRect(&rect);
(*(TEHandle)(*control)->contrlData)->viewRect = rect;
TEUpdate(&rect, (TEHandle)(*control)->contrlData);
}
bounds.left = curstate->pos.h;
bounds.right = bounds.left + curstate->width;
bounds.top = curstate->pos.v;
- bounds.bottom = bounds.top + 20 * ctrl->listbox.height;
+ bounds.bottom = bounds.top + 16 * ctrl->listbox.height + 2;
if (mac_gestalts.apprvers >= 0x100) {
InsetRect(&bounds, 3, 3);
#endif
}
add234(mcs->byctrl, mc);
- curstate->pos.v += 6 + 20 * ctrl->listbox.height;
+ curstate->pos.v += 6 + 16 * ctrl->listbox.height + 2;
mc->generic.next = mcs->panels[curstate->panelnum];
mcs->panels[curstate->panelnum] = mc;
ctrlevent(mcs, mc, EVENT_REFRESH);
Point where = {-1, -1}; /* Screen with greatest colour depth */
RGBColor incolour;
- incolour.red = r * 0x0101;
- incolour.green = g * 0x0101;
- incolour.blue = b * 0x0101;
- mcs->gotcolour = GetColor(where, "\pModify Colour:", &incolour,
- &mcs->thecolour);
- ctrlevent(mcs, mc, EVENT_CALLBACK);
+ if (HAVE_COLOR_QD()) {
+ incolour.red = r * 0x0101;
+ incolour.green = g * 0x0101;
+ incolour.blue = b * 0x0101;
+ mcs->gotcolour = GetColor(where, "\pModify Colour:", &incolour,
+ &mcs->thecolour);
+ ctrlevent(mcs, mc, EVENT_CALLBACK);
+ } else
+ dlg_beep(dlg);
}
int dlg_coloursel_results(union control *ctrl, void *dlg,