mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 08:30:59 +00:00
* 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:
parent
74fa44060f
commit
3d3125cdde
3 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue