|
From: | Andreas Höschler |
Subject: | Re: GNUstep app fails on Ubuntu 16 - found workaround |
Date: | Fri, 8 May 2020 20:00:25 +0200 |
Hi Fred,
NSButtonCell.m ================== - (NSSize) cellSize { ... if (imageToDisplay) { imageSize = [imageToDisplay size]; NSLog(@"cellSize imageSize %@", NSStringFromSize(imageSize)); } ... case NSImageLeft: case NSImageRight: s.width = imageSize.width + titleSize.width + GSCellTextImageXDist; NSLog(@"imageSize.height %f titleSize.height %f", imageSize.height, titleSize.height); s.height = MAX(imageSize.height, titleSize.height); break; ... // Add border size s.width += border.left + border.right; NSLog(@"border.top %f border.bottom %f", border.top, border.bottom); s.height += border.top + border.bottom; NSLog(@"returning s %@", NSStringFromSize(s)); ... } 2020-05-08 19:58:14.729 SOObjectBrowser[14224:14224] cellSize imageSize {width = 15; height = 15} 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] imageSize.height 15.000000 titleSize.height 10000000.000000 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] border.top 0.000000 border.bottom 0.000000 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] returning s {width = 18; height = 1e+07} 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] Reporting button::imagePosition 2 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] Reporting _cell::imagePosition 2 2020-05-08 19:58:14.730 SOObjectBrowser[14224:14224] Got height 10000004.000000. We correct this ... The mess is caused by the titleSize!? :-( I haven't set a title since this is an image only button! Regards, Andreas |
[Prev in Thread] | Current Thread | [Next in Thread] |