discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep app fails on Ubuntu 16 - found workaround


From: Fred Kiefer
Subject: Re: GNUstep app fails on Ubuntu 16 - found workaround
Date: Fri, 8 May 2020 19:28:10 +0200


> Am 08.05.2020 um 17:48 schrieb Andreas Höschler <ahoesch@smartsoft.de>:
> 
>> that is a very interesting analysis you provided. Could you tell us a bit 
>> more about the images you are using? Or to be concrete, what is the size of 
>> one of these images? If these images report such huge values for their 
>> height this would explain the behaviour you are seeing.
> 
> The images are rather tiny. Here is the one that caused the problem in one of 
> the forms:
> 
> <Contacts_RightArrow.tiff>

Yes, this looks rather small.

>> In NSButtonCell the computation of cellSize relies directly on the value 
>> reported by the image. It would also be interesting to know, which value 
>> gets used for the image position of the button cell. 
> 
> I don't set that. So I guess it's a default position!? Let's see ...
> 
> @implementation NSButton (sizeToContent)
> 
> - (void)sizeToFit
> {
>    NSSize size = [_cell cellSize];
>    if (size.height > 10000.0) 
>      {      
>       NSLog(@"Reporting button::imagePosition %d", [self imagePosition]);
>       NSLog(@"Reporting _cell::imagePosition %d", [_cell imagePosition]);
>      }
>    [self setFrameSize: size];
> }
> 
> @end

Could you please move the logging code one level down into the NSButtonCell and 
report from there how this is calculated? Also report the image size as seen by 
the cell. You could check the value of s.height at the end of the method and if 
it is huge report textSize, imageSize and border

An image position of 2 should be NSImageLeft, which is fine.

Cheers,
Fred


reply via email to

[Prev in Thread] Current Thread [Next in Thread]