From 7ebdcd6517c0e8596e6e28cb795a3d97f5b158d1 Mon Sep 17 00:00:00 2001 From: ericwa Date: Tue, 15 Oct 2013 20:33:46 +0000 Subject: [PATCH] * Source/NSTableView.m (-tile): Check the GSScrollViewNoInnerBorder user default to see whether to expand the corner view by 1pt or not. * Source/GSThemeDrawing.m (-drawTableHeaderRect:inView:): Remove special case which reduced the width of the last column header by 1pt. I don't see any reason for doing that and it looks better to me without the gap, and more uniform for themeing. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37237 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Source/GSThemeDrawing.m | 40 +--------------------------------------- Source/NSTableView.m | 5 ++++- 3 files changed, 15 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index de9817b99..35e134257 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2013-10-15 Eric Wasylishen + + * Source/NSTableView.m (-tile): Check the GSScrollViewNoInnerBorder + user default to see whether to expand the corner view by 1pt or not. + * Source/GSThemeDrawing.m (-drawTableHeaderRect:inView:): Remove + special case which reduced the width of the last column header by 1pt. + + I don't see any reason for doing that and it looks better to me without + the gap, and more uniform for themeing. + 2013-10-15 Eric Wasylishen * Source/NSButtonCell.m: diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index 4a3ec6db7..560e8806a 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -2745,7 +2745,7 @@ typedef enum { columns = [tableView tableColumns]; highlightedTableColumn = [tableView highlightedTableColumn]; - for (i = firstColumnToDraw; i < lastColumnToDraw; i++) + for (i = firstColumnToDraw; i <= lastColumnToDraw; i++) { column = [columns objectAtIndex: i]; width = [column width]; @@ -2764,44 +2764,6 @@ typedef enum { inView: tableHeaderView]; drawingRect.origin.x += width; } - if (lastColumnToDraw == [tableView numberOfColumns] - 1) - { - column = [columns objectAtIndex: lastColumnToDraw]; - width = [column width] - 1; - drawingRect.size.width = width; - cell = [column headerCell]; - if ((column == highlightedTableColumn) - || [tableView isColumnSelected: lastColumnToDraw]) - { - [cell setHighlighted: YES]; - } - else - { - [cell setHighlighted: NO]; - } - [cell drawWithFrame: drawingRect - inView: tableHeaderView]; - drawingRect.origin.x += width; - } - else - { - column = [columns objectAtIndex: lastColumnToDraw]; - width = [column width]; - drawingRect.size.width = width; - cell = [column headerCell]; - if ((column == highlightedTableColumn) - || [tableView isColumnSelected: lastColumnToDraw]) - { - [cell setHighlighted: YES]; - } - else - { - [cell setHighlighted: NO]; - } - [cell drawWithFrame: drawingRect - inView: tableHeaderView]; - drawingRect.origin.x += width; - } } - (void) drawPopUpButtonCellInteriorWithFrame: (NSRect)cellFrame diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 1f1c6666c..6afd1eabe 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -4967,11 +4967,14 @@ This method is deprecated, use -columnIndexesInRect:. */ if (_headerView != nil) { + CGFloat innerBorderWidth = [[NSUserDefaults standardUserDefaults] + boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0; + [_headerView setFrameSize: NSMakeSize (_frame.size.width, [_headerView frame].size.height)]; [_cornerView setFrameSize: - NSMakeSize ([NSScroller scrollerWidth] + 1, + NSMakeSize ([NSScroller scrollerWidth] + innerBorderWidth, [_headerView frame].size.height)]; [_headerView setNeedsDisplay: YES]; [_cornerView setNeedsDisplay: YES];