* Source/GSThemeDrawing.m:

* Source/GSThemeTools.m:
	* Headers/Additions/GNUstepGUI/GSTheme.h: Small refactor:
	most uses of -[GSTheme fillRect:withTiles:background:] use
	[NSColor clearColor], so add a version without the background:
	param.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37244 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2013-10-16 07:19:45 +00:00
parent 326a3d57f4
commit d9da770d5b
4 changed files with 42 additions and 42 deletions

View file

@ -1,3 +1,12 @@
2013-10-15 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m:
* Source/GSThemeTools.m:
* Headers/Additions/GNUstepGUI/GSTheme.h: Small refactor:
most uses of -[GSTheme fillRect:withTiles:background:] use
[NSColor clearColor], so add a version without the background:
param.
2013-10-15 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m:

View file

@ -1350,6 +1350,9 @@ withRepeatedImage: (NSImage*)image
withTiles: (GSDrawTiles*)tiles
background: (NSColor*)color;
- (NSRect) fillRect: (NSRect)rect
withTiles: (GSDrawTiles*)tiles;
/**
* Method to tile the supplied image to fill the vertical rectangle.<br />
* The rect argument is the rectangle to be filled.<br />

View file

@ -306,8 +306,7 @@
else
{
[self fillRect: frame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -349,8 +348,7 @@
else
{
[self fillRect: frame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -415,8 +413,7 @@
else
{
[self fillRect: frame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -847,8 +844,7 @@
else
{
[self fillRect: cellFrame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -945,8 +941,7 @@
else
{
[self fillRect: bounds
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1002,8 +997,7 @@
else
{
[self fillRect: cellFrame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1066,8 +1060,7 @@
else
{
[self fillRect: cellFrame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1133,8 +1126,7 @@
else
{
return [self fillRect: bounds
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1217,8 +1209,7 @@
else
{
aRect = [self fillRect: aRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
/*
@ -1245,8 +1236,7 @@
else
{
[self fillRect: aRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
aRect = [tiles contentRectForRect: aRect isFlipped: [well isFlipped]];
}
@ -1388,8 +1378,7 @@ static NSImage *spinningImages[MaxCount];
else
{
[self fillRect: bounds
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
return [tiles contentRectForRect: bounds
isFlipped: [[NSView focusView] isFlipped]];
@ -1459,8 +1448,7 @@ static NSImage *spinningImages[MaxCount];
else
{
[self fillRect: aRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1498,8 +1486,7 @@ static NSImage *spinningImages[MaxCount];
else
{
[self fillRect: cellFrame
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1721,8 +1708,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
else
{
[self fillRect: resizeBarRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -1820,8 +1806,7 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
else
{
[self fillRect: rect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -2045,8 +2030,7 @@ typedef enum {
else
{
[self fillRect: aRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -2203,8 +2187,7 @@ typedef enum {
else
{
[self fillRect: aRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -2497,8 +2480,7 @@ typedef enum {
state: GSThemeNormalState];
[self fillRect: scrollViewRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
@ -2624,8 +2606,7 @@ typedef enum {
else
{
[self fillRect: bounds
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
if (hasInnerBorder)
@ -2720,8 +2701,7 @@ typedef enum {
}
[self fillRect: tilesRect
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
}
}
}
@ -3280,8 +3260,7 @@ typedef enum {
[[GSTheme theme] fillRect: [box borderRect]
withTiles: tiles
background: [NSColor clearColor]];
withTiles: tiles];
// Restore clipping path
[NSGraphicsContext restoreGraphicsState];

View file

@ -618,6 +618,15 @@ withRepeatedImage: (NSImage*)image
fillStyle: [tiles fillStyle]];
}
- (NSRect) fillRect: (NSRect)rect
withTiles: (GSDrawTiles*)tiles
{
return [self fillRect: rect
withTiles: tiles
background: [NSColor clearColor]
fillStyle: [tiles fillStyle]];
}
- (NSRect) fillRect: (NSRect)rect
withTiles: (GSDrawTiles*)tiles
background: (NSColor*)color