Revision: 13583
http://sourceforge.net/p/skim-app/code/13583
Author: hofman
Date: 2023-08-16 09:22:06 +0000 (Wed, 16 Aug 2023)
Log Message:
-----------
drawing code for segmented control
Modified Paths:
--------------
trunk/SKNavigationWindow.m
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2023-08-15 17:11:50 UTC (rev 13582)
+++ trunk/SKNavigationWindow.m 2023-08-16 09:22:06 UTC (rev 13583)
@@ -724,12 +724,9 @@
- (void)drawSegment:(NSInteger)segment inFrame:(NSRect)frame withView:(NSView
*)controlView {
if ([self isSelectedForSegment:segment]) {
- NSRect rect = frame;
- rect.size.width -= 1.0;
- rect.size.height -= 1.0;
- rect.origin.y += 1.0;
+ NSRect rect = SKShrinkRect(SKShrinkRect(frame, 1.0, NSMaxXEdge), 1.0,
NSMinYEdge);
[NSGraphicsContext saveGraphicsState];
- [[NSColor colorWithGenericGamma22White:1.0 alpha:0.5] setFill];
+ [[NSColor colorWithGenericGamma22White:1.0 alpha:[self
isEnabledForSegment:segment] ? 0.5 : 0.3] setFill];
[[NSBezierPath bezierPathWithRoundedRect:rect xRadius:5.0 yRadius:5.0]
fill];
[NSGraphicsContext restoreGraphicsState];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit