mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:10:49 +00:00
Clear background when transparent flag is set
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35763 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1299ede1d7
commit
68f35290c3
1 changed files with 24 additions and 12 deletions
|
@ -455,7 +455,11 @@
|
||||||
NSColor *color;
|
NSColor *color;
|
||||||
|
|
||||||
rect = NSIntersectionRect(_bounds, rect);
|
rect = NSIntersectionRect(_bounds, rect);
|
||||||
if (_box_type == NSBoxCustom)
|
if (_transparent)
|
||||||
|
{
|
||||||
|
color = [NSColor clearColor];
|
||||||
|
}
|
||||||
|
else if (_box_type == NSBoxCustom)
|
||||||
{
|
{
|
||||||
color = _fill_color;
|
color = _fill_color;
|
||||||
}
|
}
|
||||||
|
@ -463,6 +467,7 @@
|
||||||
{
|
{
|
||||||
color = [_window backgroundColor];
|
color = [_window backgroundColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill inside
|
// Fill inside
|
||||||
[color set];
|
[color set];
|
||||||
NSRectFill(rect);
|
NSRectFill(rect);
|
||||||
|
@ -472,6 +477,7 @@
|
||||||
{
|
{
|
||||||
case NSNoBorder:
|
case NSNoBorder:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSLineBorder:
|
case NSLineBorder:
|
||||||
if (_box_type == NSBoxCustom)
|
if (_box_type == NSBoxCustom)
|
||||||
{
|
{
|
||||||
|
@ -484,9 +490,11 @@
|
||||||
NSFrameRect(_border_rect);
|
NSFrameRect(_border_rect);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSBezelBorder:
|
case NSBezelBorder:
|
||||||
[[GSTheme theme] drawDarkBezel: _border_rect withClip: rect];
|
[[GSTheme theme] drawDarkBezel: _border_rect withClip: rect];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSGrooveBorder:
|
case NSGrooveBorder:
|
||||||
[[GSTheme theme] drawGroove: _border_rect withClip: rect];
|
[[GSTheme theme] drawGroove: _border_rect withClip: rect];
|
||||||
break;
|
break;
|
||||||
|
@ -625,6 +633,10 @@
|
||||||
{
|
{
|
||||||
_transparent = [aDecoder decodeBoolForKey: @"NSTransparent"];
|
_transparent = [aDecoder decodeBoolForKey: @"NSTransparent"];
|
||||||
}
|
}
|
||||||
|
if ([aDecoder containsValueForKey: @"NSFullyTransparent"])
|
||||||
|
{
|
||||||
|
_transparent = [aDecoder decodeBoolForKey: @"NSFullyTransparent"];
|
||||||
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSOffsets"])
|
if ([aDecoder containsValueForKey: @"NSOffsets"])
|
||||||
{
|
{
|
||||||
[self setContentViewMargins: [aDecoder decodeSizeForKey: @"NSOffsets"]];
|
[self setContentViewMargins: [aDecoder decodeSizeForKey: @"NSOffsets"]];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue