Author: mlytwyn
Date: Fri Dec 11 00:33:34 2015
New Revision: 39232
URL: http://svn.gna.org/viewcvs/gnustep?rev=39232&view=rev
Log:
Attempt at fixing NSBox color loading
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m
libs/gui/branches/gnustep_testplant_branch/Source/NSBox.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m?rev=39232&r1=39231&r2=39232&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSThemeDrawing.m Fri Dec
11 00:33:34 2015
@@ -3357,11 +3357,15 @@
if (![box isOpaque])
{
color = [NSColor clearColor];
- }
+ }
else
{
color = [box fillColor];
-}
+ }
+ }
+ else if ([[box fillColor] isEqual:[NSColor clearColor]] == NO)
+ {
+ color = [box fillColor];
}
else
{
@@ -3390,28 +3394,33 @@
NSRectFill(clipRect);
switch (borderType)
- {
- case NSNoBorder:
- break;
- case NSLineBorder:
- if (boxType == NSBoxCustom)
- {
- [[box borderColor] set];
- NSFrameRectWithWidth([box borderRect], [box borderWidth]);
- }
- else
- {
- [[NSColor controlDarkShadowColor] set];
- NSFrameRect([box borderRect]);
- }
- break;
- case NSBezelBorder:
- [[GSTheme theme] drawDarkBezel: [box borderRect] withClip: clipRect];
- break;
- case NSGrooveBorder:
- [[GSTheme theme] drawGroove: [box borderRect] withClip: clipRect];
- break;
- }
+ {
+ case NSNoBorder:
+ break;
+ case NSLineBorder:
+ if (boxType == NSBoxCustom)
+ {
+ [[box borderColor] set];
+ NSFrameRectWithWidth([box borderRect], [box borderWidth]);
+ }
+ else if ([box borderColor] != [NSColor clearColor])
+ {
+ [[box borderColor] set];
+ NSFrameRect([box borderRect]);
+ }
+ else
+ {
+ [[NSColor controlDarkShadowColor] set];
+ NSFrameRect([box borderRect]);
+ }
+ break;
+ case NSBezelBorder:
+ [[GSTheme theme] drawDarkBezel: [box borderRect] withClip:
clipRect];
+ break;
+ case NSGrooveBorder:
+ [[GSTheme theme] drawGroove: [box borderRect] withClip: clipRect];
+ break;
+ }
}
else
{
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSBox.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSBox.m?rev=39232&r1=39231&r2=39232&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSBox.m (original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSBox.m Fri Dec 11
00:33:34 2015
@@ -629,7 +629,23 @@
NSView *cv = [NSView new];
[self setContentView: cv];
RELEASE(cv);
- }
+ }
+
+ [self setBorderColor:[NSColor clearColor]];
+ if ([aDecoder containsValueForKey:@"NSBorderColor2"])
+ {
+ NSColor *color = [aDecoder decodeObjectForKey:@"NSBorderColor2"];
+ if (color != nil)
+ [self setBorderColor:color];
+ }
+
+ [self setFillColor:[NSColor clearColor]];
+ if ([aDecoder containsValueForKey:@"NSFillColor2"])
+ {
+ NSColor *color = [aDecoder decodeObjectForKey:@"NSFillColor2"];
+ if (color != nil)
+ [self setFillColor:color];
+ }
}
else
{
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs