Use tiles for drawing scroller slots, if available

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29443 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2010-01-29 20:55:24 +00:00
parent 2d68d4d027
commit d8b6bbe16b
2 changed files with 20 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2010-01-29 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSThemeDrawing.m (-cellForScrollerKnobSlot:): If there are
tiles available, set the button cell as bordered so the tiles are
used in drawing the scroller slot.
2010-01-29 Eric Wasylishen <ewasylishen@gmail.com> 2010-01-29 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSTheme.m: * Source/GSTheme.m:

View file

@ -386,25 +386,29 @@
- (NSCell*) cellForScrollerKnobSlot: (BOOL)horizontal - (NSCell*) cellForScrollerKnobSlot: (BOOL)horizontal
{ {
GSDrawTiles *tiles;
NSButtonCell *cell; NSButtonCell *cell;
NSColor *color; NSColor *color;
NSString *name;
cell = [NSButtonCell new];
[cell setBordered: NO];
[cell setTitle: nil];
if (horizontal) if (horizontal)
{ {
color = [self colorNamed: GSScrollerHorizontalSlot name = GSScrollerHorizontalSlot;
state: GSThemeNormalState];
[self setName: GSScrollerHorizontalSlot forElement: cell temporary: YES];
} }
else else
{ {
color = [self colorNamed: GSScrollerVerticalSlot name = GSScrollerVerticalSlot;
state: GSThemeNormalState];
[self setName: GSScrollerVerticalSlot forElement: cell temporary: YES];
} }
tiles = [self tilesNamed: name state: GSThemeNormalState];
color = [self colorNamed: name state: GSThemeNormalState];
cell = [NSButtonCell new];
[cell setBordered: (tiles != nil)];
[cell setTitle: nil];
[self setName: name forElement: cell temporary: YES];
if (color == nil) if (color == nil)
{ {
color = [NSColor scrollBarColor]; color = [NSColor scrollBarColor];