Revision: 3286
http://skim-app.svn.sourceforge.net/skim-app/?rev=3286&view=rev
Author: hofman
Date: 2007-11-30 08:36:29 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Set segment style of buttons in side panes on Leopard.
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-11-30 16:09:16 UTC (rev 3285)
+++ trunk/SKMainWindowController.m 2007-11-30 16:36:29 UTC (rev 3286)
@@ -146,6 +146,24 @@
static NSString *noteToolAdornImageNames[] = {@"TextNoteToolAdorn",
@"AnchoredNoteToolAdorn", @"CircleNoteToolAdorn", @"SquareNoteToolAdorn",
@"HighlightNoteToolAdorn", @"UnderlineNoteToolAdorn",
@"StrikeOutNoteToolAdorn", @"LineNoteToolAdorn"};
+#if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_5)
+typedef enum _NSSegmentStyle {
+ NSSegmentStyleAutomatic,
+ NSSegmentStyleCapsule,
+ NSSegmentStyleRounded,
+ NSSegmentStyleRoundRect,
+ NSSegmentStyleSmallSquare,
+ NSSegmentStyleTexturedRounded,
+ NSSegmentStyleTexturedSquare
+} NSSegmentStyle;
[EMAIL PROTECTED] NSSegmentedControl (SKLeopardOnly)
+- (NSSegmentStyle)segmentStyle;
+- (void)setSegmentStyle:(NSSegmentStyle)style;
[EMAIL PROTECTED]
+#else
+#warning remove this
+#endif
+
@interface NSResponder (SKExtensions)
- (BOOL)isDescendantOf:(NSView *)aView;
@end
@@ -314,6 +332,14 @@
frame = [rightSideButton frame];
frame.size.height = SEGMENTED_CONTROL_HEIGHT;
[rightSideButton setFrame:frame];
+ frame = [findButton frame];
+ frame.size.height = SEGMENTED_CONTROL_HEIGHT;
+ [findButton setFrame:frame];
+ if ([leftSideButton respondsToSelector:@selector(setSegmentStyle:)]) {
+ [leftSideButton setSegmentStyle:NSSegmentStyleTexturedRounded];
+ [rightSideButton setSegmentStyle:NSSegmentStyleTexturedRounded];
+ [findButton setSegmentStyle:NSSegmentStyleTexturedRounded];
+ }
}
[[leftSideButton cell] setToolTip:NSLocalizedString(@"View Thumbnails",
@"Tool tip message") forSegment:SKThumbnailSidePaneState];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit