mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 06:28:54 +00:00
Account for border/bezel and draw title cell properly
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
727dff0ff5
commit
338507c3c2
1 changed files with 10 additions and 6 deletions
|
@ -88,13 +88,13 @@
|
|||
|
||||
if (_isVertical)
|
||||
{
|
||||
origin.x = 0;
|
||||
origin.y = (_trackRect.size.height - size.height) * floatValue;
|
||||
origin = _trackRect.origin;
|
||||
origin.y += (_trackRect.size.height - size.height) * floatValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
origin.x = (_trackRect.size.width - size.width) * floatValue;
|
||||
origin.y = 0;
|
||||
origin = _trackRect.origin;
|
||||
origin.x += (_trackRect.size.width - size.width) * floatValue;
|
||||
}
|
||||
|
||||
return NSMakeRect (origin.x, origin.y, size.width, size.height);
|
||||
|
@ -116,6 +116,11 @@
|
|||
NSImage* image;
|
||||
NSSize size;
|
||||
|
||||
if (_cell.is_bordered)
|
||||
cellFrame = NSInsetRect(cellFrame, 1, 1);
|
||||
else if (_cell.is_bezeled)
|
||||
cellFrame = NSInsetRect(cellFrame, 2, 2);
|
||||
|
||||
[controlView lockFocus];
|
||||
if (vertical != _isVertical) {
|
||||
if (vertical) {
|
||||
|
@ -135,10 +140,9 @@
|
|||
|
||||
_trackRect = cellFrame;
|
||||
|
||||
[self drawBarInside: cellFrame flipped: [controlView isFlipped]];
|
||||
if (_titleCell)
|
||||
[_titleCell drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
|
||||
[self drawBarInside: cellFrame flipped: [controlView isFlipped]];
|
||||
[self drawKnob];
|
||||
[controlView unlockFocus];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue