mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:10:48 +00:00
Merge branch 'master' into xib_document
This commit is contained in:
commit
d25610bf6a
4 changed files with 58 additions and 33 deletions
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
|||
2019-12-18 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSBrowser.m (frameOfColumn:): shift up column only for browser
|
||||
with separated columns layout.
|
||||
(tile): fix column height calculation; moved sanity check of column
|
||||
height closer to calculation; removed code that duplicates code below.
|
||||
|
||||
2019-12-17 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSScrollView.m (tile): tweak location and height of vertical
|
||||
scroller if header or corner view available.
|
||||
|
||||
* Source/GSThemeDrawing.m: (drawTableCornerView:withClip:): do not draw
|
||||
black rectangle because -drawDarkButton:withClip: draws all necessary
|
||||
elements.
|
||||
|
||||
* Source/GSThemeDrawing.m (drawScrollViewRect:inView:): further cleanup
|
||||
of method implementation. Removed all tweaks of scroller length - all
|
||||
required calculations must be done in NSScrollView's -tile method. Simplified
|
||||
caluclations of X and Y positions of scroller.
|
||||
|
||||
2019-12-17 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/GSThemeDrawing.m (drawScrollViewRect:inView:): fixed scroller
|
||||
border positionning and length - do not overlap border if any.
|
||||
Use [self sizeForBorderType: borderType] to determine border width.
|
||||
|
||||
2019-12-12 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSFont.m (smallSystemFontSize): return 10 as default value.
|
||||
|
|
|
@ -1446,8 +1446,6 @@ static NSImage *spinningImages[MaxCount];
|
|||
|
||||
if (tiles == nil)
|
||||
{
|
||||
[[NSColor blackColor] set];
|
||||
NSRectFill(divide);
|
||||
rect = [self drawDarkButton: rect withClip: aRect];
|
||||
[[NSColor controlShadowColor] set];
|
||||
NSRectFill(rect);
|
||||
|
@ -2646,6 +2644,7 @@ typedef enum {
|
|||
NSScroller *vertScroller = [scrollView verticalScroller];
|
||||
NSScroller *horizScroller = [scrollView horizontalScroller];
|
||||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
NSRect scrollerFrame;
|
||||
|
||||
[color set];
|
||||
|
||||
|
@ -2653,43 +2652,39 @@ typedef enum {
|
|||
{
|
||||
NSInterfaceStyle style;
|
||||
CGFloat xpos;
|
||||
CGFloat scrollerHeight = bounds.size.height;
|
||||
|
||||
|
||||
scrollerFrame = [vertScroller frame];
|
||||
|
||||
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
|
||||
if (style == NSMacintoshInterfaceStyle
|
||||
|| style == NSWindows95InterfaceStyle)
|
||||
{
|
||||
xpos = [vertScroller frame].origin.x - 1.0;
|
||||
xpos = scrollerFrame.origin.x - 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
xpos = [vertScroller frame].origin.x + scrollerWidth;
|
||||
xpos = scrollerFrame.origin.x + scrollerWidth;
|
||||
}
|
||||
NSRectFill(NSMakeRect(xpos, [vertScroller frame].origin.y - 1.0,
|
||||
1.0, scrollerHeight + 1.0));
|
||||
NSRectFill(NSMakeRect(xpos, scrollerFrame.origin.y,
|
||||
1.0, scrollerFrame.size.height));
|
||||
}
|
||||
|
||||
if ([scrollView hasHorizontalScroller])
|
||||
{
|
||||
CGFloat ypos;
|
||||
CGFloat scrollerY = [horizScroller frame].origin.y;
|
||||
CGFloat scrollerLength = bounds.size.width;
|
||||
|
||||
if ([scrollView hasVerticalScroller])
|
||||
{
|
||||
scrollerLength -= [NSScroller scrollerWidth];
|
||||
}
|
||||
scrollerFrame = [horizScroller frame];
|
||||
|
||||
if ([scrollView isFlipped])
|
||||
{
|
||||
ypos = scrollerY - 1.0;
|
||||
ypos = scrollerFrame.origin.y - 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ypos = scrollerY + scrollerWidth + 1.0;
|
||||
ypos = scrollerFrame.origin.y + scrollerWidth + 1.0;
|
||||
}
|
||||
NSRectFill(NSMakeRect([horizScroller frame].origin.x - 1.0, ypos,
|
||||
scrollerLength + 1.0, 1.0));
|
||||
NSRectFill(NSMakeRect([horizScroller frame].origin.x, ypos,
|
||||
scrollerFrame.size.width, 1.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1974,10 +1974,10 @@ static BOOL browserUseBezels;
|
|||
else
|
||||
rect.origin.y = scrollerWidth + bezelBorderSize.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.y += bezelBorderSize.width;
|
||||
}
|
||||
else if (!_separatesColumns)
|
||||
{
|
||||
rect.origin.y += bezelBorderSize.width;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2105,11 +2105,16 @@ static BOOL browserUseBezels;
|
|||
else
|
||||
{
|
||||
_scrollerRect = NSZeroRect;
|
||||
_columnSize.height -= 2 * bezelBorderSize.width;
|
||||
if (!_separatesColumns)
|
||||
_columnSize.height -= 2 * bezelBorderSize.width;
|
||||
}
|
||||
|
||||
if (_columnSize.height < 0)
|
||||
_columnSize.height = 0;
|
||||
|
||||
num = _lastVisibleColumn - _firstVisibleColumn + 1;
|
||||
|
||||
// Column count
|
||||
if (_minColumnWidth > 0)
|
||||
{
|
||||
CGFloat colWidth = _minColumnWidth + scrollerWidth;
|
||||
|
@ -2130,6 +2135,7 @@ static BOOL browserUseBezels;
|
|||
if (_maxVisibleColumns > 0 && columnCount > _maxVisibleColumns)
|
||||
columnCount = _maxVisibleColumns;
|
||||
|
||||
// Create extra columns
|
||||
if (columnCount != num)
|
||||
{
|
||||
if (num > 0)
|
||||
|
@ -2149,7 +2155,7 @@ static BOOL browserUseBezels;
|
|||
_lastVisibleColumn = _firstVisibleColumn + columnCount - 1;
|
||||
}
|
||||
|
||||
// Columns
|
||||
// Column width
|
||||
if (_separatesColumns)
|
||||
frameWidth = _frame.size.width - ((columnCount - 1) * browserColumnSeparation);
|
||||
else
|
||||
|
@ -2158,9 +2164,6 @@ static BOOL browserUseBezels;
|
|||
|
||||
_columnSize.width = (int)(frameWidth / (CGFloat)columnCount);
|
||||
|
||||
if (_columnSize.height < 0)
|
||||
_columnSize.height = 0;
|
||||
|
||||
for (i = _firstVisibleColumn; i <= _lastVisibleColumn; i++)
|
||||
{
|
||||
NSBrowserColumn *bc;
|
||||
|
@ -2178,11 +2181,6 @@ static BOOL browserUseBezels;
|
|||
return;
|
||||
}
|
||||
|
||||
{
|
||||
NSBorderType bt = _separatesColumns ? NSBezelBorder : NSNoBorder;
|
||||
[sc setBorderType: bt];
|
||||
}
|
||||
|
||||
[sc setBorderType: [self _resolvedBorderType]];
|
||||
[sc setFrame: [self frameOfColumn: i]];
|
||||
matrix = [bc columnMatrix];
|
||||
|
|
|
@ -1213,10 +1213,15 @@ GSOppositeEdge(NSRectEdge edge)
|
|||
|
||||
/** Vertically expand the scroller by 1pt on each end */
|
||||
if (overlapBorders)
|
||||
{
|
||||
{
|
||||
vertScrollerRect.origin.y -= 1;
|
||||
vertScrollerRect.size.height += 2;
|
||||
}
|
||||
else if (_hasHeaderView || _hasCornerView)
|
||||
{
|
||||
vertScrollerRect.origin.y -= 1;
|
||||
vertScrollerRect.size.height += 1;
|
||||
}
|
||||
|
||||
[_vertScroller setFrame: vertScrollerRect];
|
||||
|
||||
|
|
Loading…
Reference in a new issue