mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Merge branch 'master' into xib_document
This commit is contained in:
commit
e3c9e91ec1
7 changed files with 68 additions and 14 deletions
38
ChangeLog
38
ChangeLog
|
@ -1,3 +1,41 @@
|
|||
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
|
||||
last 2 commits.
|
||||
|
||||
2019-12-10 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSLayoutManager.h,
|
||||
* Source/GSLayoutManager.m: new method -typingAttributes returns default
|
||||
typing attributes of NSTextView.
|
||||
* Source/NSLayoutManager.m: override GSLayoutManager's -typingAttributes
|
||||
- primitive method - provides access to _typingAttributes ivar.
|
||||
* Source/GSHorizontalTypesetter.m: use new GSLayoutManager's
|
||||
-typingAttributes method to get paragraph style and font of new empty text
|
||||
container. Normally `curLayoutManager` is a NSLayoutManager object so,
|
||||
actually, we get NSLayoutManager's _typingAttributes.
|
||||
|
||||
* Source/GSHorizontalTypesetter.m: (_addExtraLineFragment) get paragraph
|
||||
style and font from NSLayoutManager's typing attributes. Fixes insertion
|
||||
point height for empty text objects (NSTextView, NSTexField etc.).
|
||||
|
||||
2019-12-09 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSStringDrawing.m: fixed incorrect string drawing (shortened, misplaced)
|
||||
|
|
|
@ -168,6 +168,7 @@ If characters have been edited, lengthChange has the text length delta.
|
|||
forStartingGlyphAtIndex: (NSUInteger)glyph
|
||||
characterIndex: (NSUInteger)index;
|
||||
|
||||
- (NSDictionary *) typingAttributes;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -534,9 +534,10 @@ For bigger values the width gets ignored.
|
|||
}
|
||||
else
|
||||
{
|
||||
// FIXME These should come from the typing attributes
|
||||
curParagraphStyle = [NSParagraphStyle defaultParagraphStyle];
|
||||
curFont = [NSFont userFontOfSize: 0];
|
||||
NSDictionary *typingAttributes = [curLayoutManager typingAttributes];
|
||||
curParagraphStyle = [typingAttributes
|
||||
objectForKey: NSParagraphStyleAttributeName];
|
||||
curFont = [typingAttributes objectForKey: NSFontAttributeName];
|
||||
}
|
||||
|
||||
line_height = [curFont defaultLineHeightForFont];
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#import "AppKit/NSAttributedString.h"
|
||||
#import "AppKit/NSTextStorage.h"
|
||||
#import "AppKit/NSTextContainer.h"
|
||||
#import "AppKit/NSTextView.h"
|
||||
|
||||
/* just for NSAttachmentCharacter */
|
||||
#import "AppKit/NSTextAttachment.h"
|
||||
|
@ -3280,7 +3281,13 @@ forStartingGlyphAtIndex: (NSUInteger)glyph
|
|||
else if (attributeTag == NSGlyphAttributeBidiLevel)
|
||||
g->bidilevel = anInt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *) typingAttributes
|
||||
{
|
||||
return [NSTextView defaultTypingAttributes];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* NSCoding protocol
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -3017,6 +3017,11 @@ no_soft_invalidation:
|
|||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *) typingAttributes
|
||||
{
|
||||
return _typingAttributes;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -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