* Source/GSThemeDrawing.m (-drawBoxInClipRect:...):

* Source/NSBox.m (-calcSizesAllowingNegative):
Special case for box type NSBoxSeparator to draw a centered line


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37210 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2013-10-08 23:42:30 +00:00
parent 74fa44060f
commit 3d3125cdde
3 changed files with 31 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2013-10-08 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m (-drawBoxInClipRect:...):
* Source/NSBox.m (-calcSizesAllowingNegative):
Special case for box type NSBoxSeparator to draw a centered line
2013-10-08 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSTabView.m: Fix incorrect content rect now that view

View file

@ -3079,13 +3079,20 @@ typedef enum {
color = [[box window] backgroundColor];
}
// Draw separator boxes
if (boxType == NSBoxSeparator)
{
[[box borderColor] set];
NSRectFill([box borderRect]);
return;
}
// Draw border
GSDrawTiles *tiles = [[GSTheme theme] tilesNamed: GSBoxBorder state: GSThemeNormalState];
if (tiles == nil
|| borderType == NSNoBorder
|| boxType == NSBoxSeparator
|| boxType == NSBoxOldStyle
|| boxType == NSBoxCustom)
{

View file

@ -645,6 +645,23 @@
GSTheme *theme = [GSTheme theme];
NSRect r = NSZeroRect;
if (_box_type == NSBoxSeparator)
{
_title_rect = NSZeroRect;
_border_rect = _bounds;
if (_bounds.size.width > _bounds.size.height)
{
_border_rect.origin.y = (int)(_border_rect.size.height / 2);
_border_rect.size.height = 1;
}
else
{
_border_rect.origin.x = (int)(_border_rect.size.width / 2);
_border_rect.size.width = 1;
}
return r;
}
switch (_title_position)
{
case NSNoTitle: