Revision: 13581
http://sourceforge.net/p/skim-app/code/13581
Author: hofman
Date: 2023-08-15 17:01:02 +0000 (Tue, 15 Aug 2023)
Log Message:
-----------
Set width for remove shadow button based on label, with 0 width it adds extra
bezel space
Modified Paths:
--------------
trunk/SKNavigationWindow.m
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2023-08-15 16:15:29 UTC (rev 13580)
+++ trunk/SKNavigationWindow.m 2023-08-15 17:01:02 UTC (rev 13581)
@@ -308,11 +308,12 @@
[removeShadowButton setAction:@selector(toggleRemoveCursorShadow:)];
if (RUNNING_BEFORE(10_14))
[[removeShadowButton cell]
setBackgroundStyle:NSBackgroundStyleDark];
+ [removeShadowButton setWidth:ceil([[removeShadowButton
labelForSegment:0] sizeWithAttributes:@{NSFontAttributeName:[removeShadowButton
font]}].width) + 8.0 forSegment:0];
[removeShadowButton sizeToFit];
rect.size.width = NSWidth([removeShadowButton frame]);
[[self contentView] addSubview:removeShadowButton];
- rect.origin.x = NSMaxX(rect) - SMALL_SEP_WIDTH;
+ rect.origin.x = NSMaxX(rect);
rect.size.width = SMALL_SEP_WIDTH;
[[self contentView] addSubview:[[[SKNavigationSeparator alloc]
initWithFrame:rect] autorelease]];
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