Make the window border color customizable

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29595 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2010-02-12 23:57:21 +00:00
parent 411d3e27bc
commit f91e4cceec
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2010-02-12 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m: Make the window border color customizable
2010-02-12 Eric Wasylishen <ewasylishen@gmail.com>
* Headers/Additions/GNUstepGUI/GSTheme.h:

View file

@ -1236,7 +1236,14 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
border is drawn in -drawRect: since it might be drawn even if we don't have
a title bar.
*/
[[NSColor blackColor] set];
NSColor *borderColor = [self colorNamed: @"windowBorderColor"
state: GSThemeNormalState];
if (nil == borderColor)
{
borderColor = [NSColor blackColor];
}
[borderColor set];
PSmoveto(0, NSMinY(titleBarRect) + 0.5);
PSrlineto(titleBarRect.size.width, 0);
PSstroke();
@ -1388,8 +1395,14 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
if (styleMask & (NSTitledWindowMask | NSClosableWindowMask
| NSMiniaturizableWindowMask | NSResizableWindowMask))
{
NSColor *borderColor = [self colorNamed: @"windowBorderColor"
state: GSThemeNormalState];
if (nil == borderColor)
{
borderColor = [NSColor blackColor];
}
[borderColor set];
PSsetlinewidth(1.0);
[[NSColor blackColor] set];
if (NSMinX(rect) < 1.0)
{
PSmoveto(0.5, 0.0);