discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Changing control font size


From: Fred Kiefer
Subject: Re: Changing control font size
Date: Wed, 22 Sep 2021 23:18:17 +0200

Ignore that list. The only defined font sizes in the defaults are 
@„NSFontSize“, @„NSLabelFontSize“ and @„NSSmallFontSize“. You have to use these 
strings if you want to set this programmatically but most likely it is easier 
to set them via the defaults file once.

Hope this helps,
Fred

> Am 22.09.2021 um 15:40 schrieb Andreas Höschler <ahoesch@smartsoft.de>:
> 
> Hi all,
> 
> I am building a GNUstep app on Ubuntu 20.04 and would like the font used by 
> NSButtons, NSTableView, NSComboBox etc. to be larger as normal for industrial 
> usage of the app (better readability from further away from the screen).
> 
> I found this list 
> > NSBoldFontSize
> 
> >
>  NSControlContentFontSize
> 
> >
>  NSFontSize
> 
> >
>  NSLabelFontSize
> 
> >
>  NSMenuFontSize
> 
> >
>  NSMiniFontSize
> 
> >
>  NSMessageFontSize
> 
> >
>  NSPaletteFontSize
> 
> >
>  NSSmallFontSize
> 
> >
>  NSTitleBarFontSize
> 
> >
>  NSToolTipsFontSize
> 
> >
>  NSUserFixedPitchFontSize
> 
> >
>  NSUserFontSize
> and greped through the GNUstep sources for NSControlContentFontSize but only 
> found 
> 
>       grep -r "NSControlContentFontSize" /usr/src/GNUstep/
> 
> /usr/src/GNUstep/libs-gui/Source/NSFont.m:    <item>NSControlContentFontSize  
> (none)</item>
> /usr/src/GNUstep/libs-gui/Source/NSToolbarItem.m:  // [NSFont 
> smallSystemFontSize] or better should be NSControlContentFontSize
> 
> Is this default used at all? How would I programmatically change the font 
> size for all the controls in the user interface. I intuitively tried 
> 
>    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber 
> numberWithFloat:20.0] forKey:NSControlContentFontSize];
>    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber 
> numberWithFloat:20.0] forKey:NSLabelFontSize];
> 
> but this of course does not build since NSControlContentFontSize is 
> undefined. 
> 
> I am obviously missing the point!? :-(
> 
> Any idea?
> 
> Thanks a lot, 
> 
>  Andreas
> 
> 
> 




reply via email to

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