discuss-gnustep
[Top][All Lists]
Advanced

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

Changing control font size


From: Andreas Höschler
Subject: Changing control font size
Date: Wed, 22 Sep 2021 15:40:27 +0200

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]