Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nib2cib allows CPCheckBox and CPRadio to have themed height #1694

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions Tools/nib2cib/NSButton.j
Expand Up @@ -209,7 +209,7 @@ var NSButtonIsBorderedMask = 0x00800000,
fixedHeight = YES; fixedHeight = YES;
} }


if ([cell isBordered]) if ([cell isBordered] || [self isKindOfClass:[CPRadio class]] || [self isKindOfClass:[CPCheckBox class]])
{ {
/* /*
Try to figure out the intention of the theme in regards to fixed height buttons. Try to figure out the intention of the theme in regards to fixed height buttons.
Expand Down Expand Up @@ -248,11 +248,14 @@ var NSButtonIsBorderedMask = 0x00800000,
CPLog.debug("NSButton [%s]: adjusted height from %d to %d", _title == null ? "<no title>" : '"' + _title + '"', oldHeight, _frame.size.height); CPLog.debug("NSButton [%s]: adjusted height from %d to %d", _title == null ? "<no title>" : '"' + _title + '"', oldHeight, _frame.size.height);
} }


// Reposition the buttons according to its particular offsets if ([cell isBordered])
_frame.origin.x += positionOffsetOriginX; {
_frame.origin.y += positionOffsetOriginY; // Reposition the buttons according to its particular offsets
_frame.size.width += positionOffsetSizeWidth; _frame.origin.x += positionOffsetOriginX;
_bounds.size.width += positionOffsetSizeWidth; _frame.origin.y += positionOffsetOriginY;
_frame.size.width += positionOffsetSizeWidth;
_bounds.size.width += positionOffsetSizeWidth;
}
} }


_keyEquivalent = [cell keyEquivalent]; _keyEquivalent = [cell keyEquivalent];
Expand Down