Font increase/decrease now affect File Drawer too. This is experimental behaviour.
parent
77fd3cbe95
commit
0126a58679
|
@ -476,25 +476,34 @@ increase/decrease as long as the user holds the left/right, plus/minus button */
|
||||||
|
|
||||||
- (void)changeFontSize:(float)size
|
- (void)changeFontSize:(float)size
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
NSFont *f = [[NSFontManager sharedFontManager] selectedFont];
|
NSFont *f = [[NSFontManager sharedFontManager] selectedFont];
|
||||||
float origFontSize = [[f fontDescriptor] pointSize];
|
float origFontSize = [[f fontDescriptor] pointSize];
|
||||||
|
|
||||||
|
// hack to make the file drawer stay unbolded - might affect things I haven't seen
|
||||||
|
f = [[NSFontManager sharedFontManager] convertFont:f toNotHaveTrait:NSBoldFontMask];
|
||||||
|
|
||||||
f = [[NSFontManager sharedFontManager] convertFont:f toSize:origFontSize+size];
|
f = [[NSFontManager sharedFontManager] convertFont:f toSize:origFontSize+size];
|
||||||
|
|
||||||
NSEnumerator *oe = [[playlistView tableColumns] objectEnumerator];
|
NSEnumerator *playlistEntries = [[playlistView tableColumns] objectEnumerator];
|
||||||
|
NSEnumerator *fileDrawerEntries = [[fileOutlineView tableColumns] objectEnumerator];
|
||||||
|
|
||||||
id c;
|
id c;
|
||||||
|
|
||||||
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
|
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
|
||||||
[playlistView setRowHeight:[layoutManager defaultLineHeightForFont:f]];
|
[playlistView setRowHeight:[layoutManager defaultLineHeightForFont:f]];
|
||||||
|
[fileOutlineView setRowHeight:[layoutManager defaultLineHeightForFont:f]];
|
||||||
[layoutManager release];
|
[layoutManager release];
|
||||||
|
|
||||||
while (c = [oe nextObject])
|
while (c = [playlistEntries nextObject])
|
||||||
{
|
{
|
||||||
[[c dataCell] setFont:f];
|
[[c dataCell] setFont:f];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while (c = [fileDrawerEntries nextObject])
|
||||||
|
{
|
||||||
|
[[c dataCell] setFont:f];
|
||||||
|
}
|
||||||
|
|
||||||
// we must set the selectedFont so that we have updated font information
|
// we must set the selectedFont so that we have updated font information
|
||||||
// next time we want to change it
|
// next time we want to change it
|
||||||
[[NSFontManager sharedFontManager] setSelectedFont:f isMultiple:NO];
|
[[NSFontManager sharedFontManager] setSelectedFont:f isMultiple:NO];
|
||||||
|
|
Loading…
Reference in New Issue