mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 20:49:22 +00:00
make nib2cib work either with Aristo1 or Aristo2 for dynamic widget adjustment
This commit is contained in:
1 parent
1448791fcd
commit
53fa384608
4 files changed
+24
-4
No files matched your search
@@ -38,6 +38,14 @@
|
||||
[self setMaximumRecents:[cell maximumRecents]];
|
||||
[self setSendsWholeSearchString:[cell sendsWholeSearchString]];
|
||||
[self setSendsSearchStringImmediately:[cell sendsSearchStringImmediately]];
|
||||
|
||||
if ([[[Converter sharedConverter] themes][0] name] == @"Aristo" && [self isBezeled])
|
||||
{
|
||||
// NSTextField.j makes the field +7.0 pixels tall. We want +8.0 to go to 30.
|
||||
var frame = [self frame];
|
||||
[self setFrameSize:CGSizeMake(frame.size.width, frame.size.height)];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -59,7 +59,10 @@
|
||||
|
||||
// Adjust for differences between Cocoa and Cappuccino widget framing.
|
||||
frame.origin.x += 4;
|
||||
frame.size.height += 1;
|
||||
|
||||
if ([[[Converter sharedConverter] themes][0] name] == @"Aristo2")
|
||||
frame.size.height += 1;
|
||||
|
||||
frame.size.width = originalWidth;
|
||||
[self setFrame:frame];
|
||||
}
|
||||
|
||||
@@ -33,8 +33,11 @@
|
||||
// change the default height
|
||||
if (_bounds.size.height === 17)
|
||||
{
|
||||
_bounds.size.height = 23;
|
||||
_frame.size.height = 23;
|
||||
var theme = [[Converter sharedConverter] themes][0],
|
||||
height = [theme valueForAttributeWithName:@"default-row-height" forClass:CPTableView];
|
||||
|
||||
_bounds.size.height = height;
|
||||
_frame.size.height = height;
|
||||
}
|
||||
|
||||
_drawsColumnLines = YES;
|
||||
|
||||
@@ -40,7 +40,13 @@
|
||||
|
||||
// Convert xib default to cib default
|
||||
if (_rowHeight == 17)
|
||||
_rowHeight = 23;
|
||||
{
|
||||
var theme = [[Converter sharedConverter] themes][0],
|
||||
height = [theme valueForAttributeWithName:@"default-row-height" forClass:CPTableView];
|
||||
|
||||
_rowHeight = height;
|
||||
}
|
||||
|
||||
|
||||
_headerView = [aCoder decodeObjectForKey:@"NSHeaderView"];
|
||||
|
||||
|
||||
Reference in new issue
Block a user