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:
Eric Wasylishen 2010-01-29 20:55:24 +00:00
parent a3835dbe56
commit cd3d1785e3
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>
* Source/GSTheme.m:

View file

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