mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Merge pull request #38 from trunkmaster/master
Miniwindow image and title fixes.
This commit is contained in:
commit
ec26b4e01b
3 changed files with 29 additions and 10 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2019-12-12 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSFont.m (smallSystemFontSize): return 10 as default value.
|
||||
Update documention comment regarding default values for NSMiniFontSize
|
||||
ans NSSmallFontSize.
|
||||
|
||||
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
|
||||
|
|
|
@ -166,10 +166,10 @@ keyForFont(NSString *name, const CGFloat *matrix,
|
|||
<item>NSFontSize 12 (System Font Size)</item>
|
||||
<item>NSLabelFontSize (none)</item>
|
||||
<item>NSMenuFontSize (none)</item>
|
||||
<item>NSMiniFontSize 6</item>
|
||||
<item>NSMiniFontSize 8</item>
|
||||
<item>NSMessageFontSize (none)</item>
|
||||
<item>NSPaletteFontSize (none)</item>
|
||||
<item>NSSmallFontSize 9</item>
|
||||
<item>NSSmallFontSize 10</item>
|
||||
<item>NSTitleBarFontSize (none)</item>
|
||||
<item>NSToolTipsFontSize (none)</item>
|
||||
<item>NSUserFixedPitchFontSize (none)</item>
|
||||
|
@ -656,7 +656,7 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
if (fontSize == 0)
|
||||
{
|
||||
fontSize = 9;
|
||||
fontSize = 10;
|
||||
}
|
||||
|
||||
return fontSize;
|
||||
|
@ -684,7 +684,7 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
|
||||
if (fontSize == 0)
|
||||
{
|
||||
fontSize = 6;
|
||||
fontSize = 8;
|
||||
}
|
||||
|
||||
return fontSize;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue