mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Use fred's calculation for moving the knob
This commit is contained in:
parent
be756441aa
commit
627a4894cc
1 changed files with 2 additions and 1 deletions
|
@ -902,6 +902,7 @@
|
|||
CGFloat w = (frame.size.width / 2) - 2;
|
||||
CGFloat h = frame.size.height - 5;
|
||||
CGFloat y = frame.origin.y + 2;
|
||||
CGFloat radius = frame.size.height / 2.0;
|
||||
|
||||
[backgroundColor set];
|
||||
if(value == NSControlStateValueOff)
|
||||
|
@ -913,7 +914,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
rect = NSMakeRect(frame.origin.x + ((frame.size.width - w) - 2),
|
||||
rect = NSMakeRect(frame.origin.x + ((frame.size.width - 2 * radius) + 2), // ((frame.size.width - w) - 2)
|
||||
y,
|
||||
w,
|
||||
h);
|
||||
|
|
Loading…
Reference in a new issue