From 9d69ec739f7dd75b75d682f670e5373dc833255e Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 22 Apr 2013 15:38:31 -0700 Subject: [PATCH] Fixed: CornerView in TableViews from cibs sized Previously the size of the cornerView was wrong in a TableView from cib. Now the nib2cib of _CPCornerView set the good value. Fixes #1865 --- Tools/nib2cib/_NSCornerView.j | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Tools/nib2cib/_NSCornerView.j b/Tools/nib2cib/_NSCornerView.j index c8944c9e3..83e667d50 100644 --- a/Tools/nib2cib/_NSCornerView.j +++ b/Tools/nib2cib/_NSCornerView.j @@ -22,6 +22,13 @@ @import @import +@import +@import + +@class Nib2Cib + +@global CPThemeStateVertical +@global CPThemeStateScrollViewLegacy @implementation _CPCornerView (NSCoding) @@ -39,10 +46,17 @@ - (id)initWithCoder:(CPCoder)aCoder { self = [super NS_initWithCoder:aCoder]; + if (self) { - _frame.size.height = 23.0; - _bounds.size.height = 23.0; + var theme = [Nib2Cib defaultTheme], + height = [theme valueForAttributeWithName:@"default-row-height" forClass:[CPTableView class]], + width = [theme valueForAttributeWithName:@"scroller-width" inState:CPThemeStateVertical | CPThemeStateScrollViewLegacy forClass:[CPScroller class]]; + + _frame.size.height = height; + _bounds.size.height = height; + _frame.size.width = width; + _bounds.size.width = width; } return self;