This isn't _quite_ right, since it uses a b/w dither everywhere, whereas
it should use grey on colour screens. That would involve mucking around
with DeviceLoop, though, and I'm not sure I can be bothered.
git-svn-id: svn://svn.tartarus.org/sgt/putty@3066
cda61777-01e9-0310-a592-
d414129be87e
-/* $Id: macctrls.c,v 1.28 2003/04/05 17:19:38 ben Exp $ */
+/* $Id: macctrls.c,v 1.29 2003/04/05 18:00:46 ben Exp $ */
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
struct {
struct macctrl_generic generic;
ControlRef tbctrl;
struct {
struct macctrl_generic generic;
ControlRef tbctrl;
} button;
struct {
struct macctrl_generic generic;
} button;
struct {
struct macctrl_generic generic;
c2pstrcpy(title, ctrl->button.label);
mc->button.tbctrl = NewControl(window, &bounds, title, TRUE, 0, 0, 1,
pushButProc, (long)mc);
c2pstrcpy(title, ctrl->button.label);
mc->button.tbctrl = NewControl(window, &bounds, title, TRUE, 0, 0, 1,
pushButProc, (long)mc);
+ mc->button.tbring = NULL;
if (mac_gestalts.apprvers >= 0x100) {
Boolean isdefault = ctrl->button.isdefault;
if (mac_gestalts.apprvers >= 0x100) {
Boolean isdefault = ctrl->button.isdefault;
sizeof(isdefault), &isdefault);
} else if (ctrl->button.isdefault) {
InsetRect(&bounds, -4, -4);
sizeof(isdefault), &isdefault);
} else if (ctrl->button.isdefault) {
InsetRect(&bounds, -4, -4);
- NewControl(window, &bounds, title, TRUE, 0, 0, 1,
- SYS7_DEFAULT_PROC, (long)mc);
+ mc->button.tbring = NewControl(window, &bounds, title, TRUE, 0, 0, 1,
+ SYS7_DEFAULT_PROC, (long)mc);
}
if (mac_gestalts.apprvers >= 0x110) {
Boolean iscancel = ctrl->button.iscancel;
}
if (mac_gestalts.apprvers >= 0x110) {
Boolean iscancel = ctrl->button.iscancel;
RgnHandle rgn;
Rect rect;
int oval;
RgnHandle rgn;
Rect rect;
int oval;
switch (msg) {
case drawCntl:
if ((*control)->contrlVis) {
rect = (*control)->contrlRect;
switch (msg) {
case drawCntl:
if ((*control)->contrlVis) {
rect = (*control)->contrlRect;
+ GetPenState(&savestate);
PenNormal();
PenSize(3, 3);
PenNormal();
PenSize(3, 3);
+ if ((*control)->contrlHilite == kControlInactivePart)
+ PenPat(&qd.gray);
oval = (rect.bottom - rect.top) / 2 + 2;
FrameRoundRect(&rect, oval, oval);
oval = (rect.bottom - rect.top) / 2 + 2;
FrameRoundRect(&rect, oval, oval);
+ SetPenState(&savestate);
}
return 0;
case calcCRgns:
}
return 0;
case calcCRgns:
break;
case MACCTRL_BUTTON:
HiliteControl(mc->button.tbctrl, state);
break;
case MACCTRL_BUTTON:
HiliteControl(mc->button.tbctrl, state);
+ if (mc->button.tbring != NULL)
+ HiliteControl(mc->button.tbring, state);
break;
case MACCTRL_POPUP:
HiliteControl(mc->popup.tbctrl, state);
break;
case MACCTRL_POPUP:
HiliteControl(mc->popup.tbctrl, state);