Author: mlytwyn
Date: Fri Mar 10 22:58:38 2017
New Revision: 40381

URL: http://svn.gna.org/viewcvs/gnustep?rev=40381&view=rev
Log:
Fix incorrect column size on combo box items

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSComboBoxCell.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSComboBoxCell.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSComboBoxCell.m?rev=40381&r1=40380&r2=40381&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSComboBoxCell.m  
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSComboBoxCell.m  Fri Mar 
10 22:58:38 2017
@@ -168,6 +168,7 @@
   
   column = [[NSTableColumn alloc] initWithIdentifier: @"content"];
   cell = [[NSCell alloc] initTextCell: @""];
+  [cell setLineBreakMode: NSLineBreakByTruncatingTail];
   [column setDataCell: cell];
   RELEASE(cell);
   [_tableView addTableColumn: column];
@@ -184,7 +185,7 @@
                                                                
borderRect.size.height)];
   [scrollView setHasVerticalScroller: YES];
   [scrollView setDocumentView: _tableView];
-  [_tableView release];
+  RELEASE(_tableView);
   [box setContentView: scrollView];
   RELEASE(scrollView);
   
@@ -202,6 +203,16 @@
 {
   // Browser, table view and scroll view were not retained so don't release 
them
   [super dealloc];
+}
+
+- (void)setFrame:(NSRect)frameRect display:(BOOL)flag
+{
+  [super setFrame: frameRect display: flag];
+
+  // Column needs to track with frame size changes - and since this class 
breaks
+  // the GNUstep table view paradigm relationship (NSClipView/NSTableView) and 
is
+  // now resized outside the normal sequence we fudge it here...
+  [[[_tableView tableColumns] objectAtIndex: 0] setWidth: 
frameRect.size.width];
 }
 
 - (void) layoutWithComboBoxCell: (NSComboBoxCell *)comboBoxCell


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to