* Source/NSWindow.m

(initialize): use MiniWindowTile image for miniwindow tile.
(drawRect:): adjusted position of title cell to fit tile image.
(setTitle:): disable drawing of title cell background;
use NSMiniControlSize font size for miniwindow title cell.

* Source/NSFont.m (systemFontSizeForControlSize:): increased default font
size for NSMiniControlSize.
This commit is contained in:
Sergii Stoian 2019-12-11 14:30:44 +02:00
parent 063e5708e7
commit e5a7cba164
3 changed files with 20 additions and 7 deletions

View file

@ -1,3 +1,14 @@
2019-12-11 Sergii Stoian <stoyan255@gmail.com>
* Source/NSWindow.m
(initialize): use MiniWindowTile image for miniwindow tile.
(drawRect:): adjusted position of title cell to fit tile image.
(setTitle:): disable drawing of title cell background;
use NSMiniControlSize font size for miniwindow title cell.
* Source/NSFont.m (systemFontSizeForControlSize:): increased default font
size for NSMiniControlSize.
2019-12-11 Sergii Stoian <stoyan255@gmail.com>
* Source/GSHorizontalTypesetter.m: removed extra imports left from

View file

@ -684,7 +684,7 @@ static void setNSFont(NSString *key, NSFont *font)
if (fontSize == 0)
{
fontSize = 6;
fontSize = 8;
}
return fontSize;

View file

@ -481,7 +481,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
iconSize = GSGetIconSize();
tileImage = [[GSCurrentServer() iconTileImage] copy];
tileImage = [[NSImage imageNamed:@"common_MiniWindowTile"] copy];
[tileImage setScalesWhenResized: YES];
[tileImage setSize: iconSize];
@ -514,8 +514,8 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
iconSize.width - ((iconSize.width / 8) * 2),
iconSize.height - ((iconSize.height / 8) * 2))
inView: self];
[titleCell drawWithFrame: NSMakeRect(1, iconSize.height - 12,
iconSize.width - 2, 11)
[titleCell drawWithFrame: NSMakeRect(3, iconSize.height - 13,
iconSize.width - 6, 10)
inView: self];
}
@ -600,15 +600,17 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
{
if (titleCell == nil)
{
CGFloat fontSize;
titleCell = [[NSTextFieldCell alloc] initTextCell: aString];
[titleCell setSelectable: NO];
[titleCell setEditable: NO];
[titleCell setBordered: NO];
[titleCell setAlignment: NSCenterTextAlignment];
[titleCell setDrawsBackground: YES];
[titleCell setBackgroundColor: [NSColor blackColor]];
[titleCell setDrawsBackground: NO];
[titleCell setTextColor: [NSColor whiteColor]];
[titleCell setFont: [NSFont systemFontOfSize: 8]];
fontSize = [NSFont systemFontSizeForControlSize: NSMiniControlSize];
[titleCell setFont: [NSFont systemFontOfSize: fontSize]];
}
else
{