mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
nib2cib allows CPCheckBox and CPRadio to have themed height and adjusts it correctly
This commit is contained in:
1 parent
e28a78afd3
commit
744f3d70ed
1 file changed
+9
-6
@@ -209,7 +209,7 @@ var NSButtonIsBorderedMask = 0x00800000,
|
||||
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.
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
// Reposition the buttons according to its particular offsets
|
||||
_frame.origin.x += positionOffsetOriginX;
|
||||
_frame.origin.y += positionOffsetOriginY;
|
||||
_frame.size.width += positionOffsetSizeWidth;
|
||||
_bounds.size.width += positionOffsetSizeWidth;
|
||||
if ([cell isBordered])
|
||||
{
|
||||
// Reposition the buttons according to its particular offsets
|
||||
_frame.origin.x += positionOffsetOriginX;
|
||||
_frame.origin.y += positionOffsetOriginY;
|
||||
_frame.size.width += positionOffsetSizeWidth;
|
||||
_bounds.size.width += positionOffsetSizeWidth;
|
||||
}
|
||||
}
|
||||
|
||||
_keyEquivalent = [cell keyEquivalent];
|
||||
|
||||
Reference in new issue
Block a user