mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-28 11:00:46 +00:00
* Source/GSThemeDrawing.m: Use theme tiles (if available)
to draw segmented controls, chosen based on the segment style constant, and falling back to drawing buttons if the segment tiles are not available. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29452 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b6ff87adec
commit
b2bc86196a
2 changed files with 34 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-01-31 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/GSThemeDrawing.m: Use theme tiles (if available)
|
||||||
|
to draw segmented controls, chosen based on the segment style constant,
|
||||||
|
and falling back to drawing buttons if the segment tiles are not
|
||||||
|
available.
|
||||||
|
|
||||||
2010-01-29 Eric Wasylishen <ewasylishen@gmail.com>
|
2010-01-29 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/GSTheme.m:
|
* Source/GSTheme.m:
|
||||||
|
|
|
@ -684,11 +684,33 @@
|
||||||
roundedLeft: (BOOL)roundedLeft
|
roundedLeft: (BOOL)roundedLeft
|
||||||
roundedRight: (BOOL)roundedRight
|
roundedRight: (BOOL)roundedRight
|
||||||
{
|
{
|
||||||
[[GSTheme theme] drawButton: cellFrame
|
GSDrawTiles *tiles;
|
||||||
in: cell
|
NSString *name = GSStringFromSegmentStyle(style);
|
||||||
view: controlView
|
if (roundedLeft)
|
||||||
style: NSRegularSquareBezelStyle
|
{
|
||||||
state: state];
|
name = [name stringByAppendingString: @"RoundedLeft"];
|
||||||
|
}
|
||||||
|
if (roundedRight)
|
||||||
|
{
|
||||||
|
name = [name stringByAppendingString: @"RoundedRight"];
|
||||||
|
}
|
||||||
|
|
||||||
|
tiles = [self tilesNamed: name state: state];
|
||||||
|
|
||||||
|
if (tiles == nil)
|
||||||
|
{
|
||||||
|
[self drawButton: cellFrame
|
||||||
|
in: cell
|
||||||
|
view: controlView
|
||||||
|
style: NSRegularSquareBezelStyle
|
||||||
|
state: state];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self fillRect: cellFrame
|
||||||
|
withTiles: tiles
|
||||||
|
background: [NSColor clearColor]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) drawImage: (NSImage *)image
|
- (void) drawImage: (NSImage *)image
|
||||||
|
|
Loading…
Reference in a new issue