Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b2cc7f

Browse files
committed
Fixed size menu item layout and updated readme.
1 parent2f3dbfb commit7b2cc7f

File tree

4 files changed

+35
-30
lines changed

4 files changed

+35
-30
lines changed

‎README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
#SCXcodeMinimap v2.0
1+
#SCXcodeMinimap v2.2
22
SCXcodeMiniMap is a Xcode plugin that adds a source editor Minimap to Xcode.
33

4-
Version 2.0 has been rewritten from the ground up to address performance issues (delays on large source files - 1000+ lines) and for creating a better base to build upon. As such, the following new features are now supported:
4+
####Features
55

6-
####New Features
7-
- Faster syntax highlighting
8-
- Shows code foldings
9-
- Comment and preprocessor directive highlighting
10-
- Breakpoint highlighting
11-
- All highlighting options are also available for the main Xcode editor
6+
- Custom size
127
- Custom themes
13-
- All options are accessible from the View/Minimap menu item
8+
- Can hide the main editor scroller
9+
- Show code foldings
10+
- Highlights comments and preprocessor directives
11+
- Highlights breakpoints
12+
- Highlights build errors and warnings
13+
- Hihglights Xcode's "instances of selected symbol" (Preferences/Text Editing)
14+
- All these highlighting options are also available for the main editor
15+
16+
All options are configurable through the View/Minimap menu item
1417

1518
####Screenshots
1619
Without editor highlighting | With editor highlighting
1720
:--------------------------:|:--------------------------:
18-
![](https://dl.dropboxusercontent.com/u/12748201/SCXcodeMiniMap/v2.0/SCXcodeMinimap%20v2.0-01.png) |![](https://dl.dropboxusercontent.com/u/12748201/SCXcodeMiniMap/v2.0/SCXcodeMinimap%20v2.0-03.png) |
19-
![](https://dl.dropboxusercontent.com/u/12748201/SCXcodeMiniMap/v2.0/SCXcodeMinimap%20v2.0-02.png) |![](https://dl.dropboxusercontent.com/u/12748201/SCXcodeMiniMap/v2.0/SCXcodeMinimap%20v2.0-04.png) |
21+
![](https://dl.dropboxusercontent.com/u/12748201/Recordings/SCXcodeMinimap/v2.2/SCXcodeMinimap%20v2.0-01.png) |![](https://dl.dropboxusercontent.com/u/12748201/Recordings/SCXcodeMinimap/v2.2/SCXcodeMinimap%20v2.0-03.png) |
22+
![](https://dl.dropboxusercontent.com/u/12748201/Recordings/SCXcodeMinimap/v2.2/SCXcodeMinimap%20v2.0-02.png) |![](https://dl.dropboxusercontent.com/u/12748201/Recordings/SCXcodeMinimap/v2.2/SCXcodeMinimap%20v2.0-04.png) |
23+
24+
![](https://dl.dropboxusercontent.com/u/12748201/Recordings/SCXcodeMinimap/v2.2/selectedSymbolInstancesHighlighting.gif)
2025

2126
####Installation
2227
- Through[Alcatraz](https://github.com/supermarin/Alcatraz)

‎SCXcodeMinimap/DBGBreakpointAnnotationProvider+SCXcodeMinimap.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ + (void)load
2121
}
2222

2323
- (id<DBGBreakpointAnnotationProviderDelegate>)minimapDelegate
24-
{
24+
{
2525
returnobjc_getAssociatedObject(self,@selector(minimapDelegate));
2626
}
2727

‎SCXcodeMinimap/SCXcodeMinimap.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ - (void)createMenuItem
129129

130130
[minimapMenuaddItem:[NSMenuItemseparatorItem]];
131131

132-
NSView *sizeView = [[NSViewalloc]initWithFrame:CGRectMake(0.0f,0.0f,200.0f,20.0f)];
132+
NSView *sizeView = [[NSViewalloc]initWithFrame:CGRectMake(0.0f,0.0f,225.0f,20.0f)];
133133
[sizeViewsetAutoresizingMask:NSViewMinXMargin | NSViewMaxXMargin | NSViewMinYMargin | NSViewMaxYMargin];
134134

135-
NSTextField *sizeViewTitleLabel = [[NSTextFieldalloc]initWithFrame:NSMakeRect(18.0f,0.0f,50.0f,20.0f)];
135+
NSTextField *sizeViewTitleLabel = [[NSTextFieldalloc]initWithFrame:NSMakeRect(20.0f,0.0f,50.0f,20.0f)];
136136
[sizeViewTitleLabelsetStringValue:kSizeMenuItemTitle];
137137
[sizeViewTitleLabelsetFont:[NSFontsystemFontOfSize:14]];
138138
[sizeViewTitleLabelsetBezeled:NO];
@@ -141,7 +141,7 @@ - (void)createMenuItem
141141
[sizeViewTitleLabelsetSelectable:NO];
142142
[sizeViewaddSubview:sizeViewTitleLabel];
143143

144-
NSSlider *sizeSlider = [[NSSlideralloc]initWithFrame:CGRectMake(60.0f,0.0f,136.0f,20.0f)];
144+
NSSlider *sizeSlider = [[NSSlideralloc]initWithFrame:CGRectMake(60.0f,0.0f,156.0f,20.0f)];
145145
[sizeSlidersetMaxValue:0.35f];
146146
[sizeSlidersetMinValue:0.05f];
147147
[sizeSlidersetTarget:self];

‎SCXcodeMinimap/SCXcodeMinimapView.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ @interface SCXcodeMinimapView () < NSLayoutManagerDelegate,
9696
@implementationSCXcodeMinimapView
9797

9898
- (void)dealloc
99-
{
99+
{
100100
for(id observer in self.notificationObservers) {
101101
[[NSNotificationCenterdefaultCenter]removeObserver:observer];
102102
}
@@ -113,7 +113,7 @@ - (instancetype)initWithEditor:(IDESourceCodeEditor *)editor
113113
self.editor = editor;
114114

115115
self.editorTextView = editor.textView;
116-
116+
117117
[selfsetWantsLayer:YES];
118118
[selfsetAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin | NSViewWidthSizable | NSViewHeightSizable];
119119

@@ -251,10 +251,10 @@ - (void)viewDidMoveToWindow
251251
if(self.window ==nil) {
252252
return;
253253
}
254-
255-
dispatch_async(dispatch_get_main_queue(), ^{
256-
[selfsetVisible:[[[NSUserDefaultsstandardUserDefaults]objectForKey:SCXcodeMinimapShouldDisplayKey]boolValue]];
257-
});
254+
255+
dispatch_async(dispatch_get_main_queue(), ^{
256+
[selfsetVisible:[[[NSUserDefaultsstandardUserDefaults]objectForKey:SCXcodeMinimapShouldDisplayKey]boolValue]];
257+
});
258258
}
259259

260260
#pragma mark - Show/Hide
@@ -265,7 +265,7 @@ - (void)setVisible:(BOOL)visible
265265

266266
[selfupdateSize];
267267

268-
[self.textView.layoutManagersetDelegate:(self.hidden ?nil :self)];
268+
[self.textView.layoutManagersetDelegate:(self.hidden ?nil :self)];
269269
[self.textView.layoutManagersetBackgroundLayoutEnabled:YES];
270270
[self.textView.layoutManagersetAllowsNonContiguousLayout:YES];
271271

@@ -301,7 +301,7 @@ - (NSDictionary *)layoutManager:(NSLayoutManager *)layoutManager
301301
[selfdelayedInvalidateDisplayForVisibleRange];
302302
return @{NSForegroundColorAttributeName : theme.sourcePlainTextColor};
303303
}
304-
304+
305305
if(self.shouldAllowFullSyntaxHighlight) {
306306

307307
if(self.highlightedSymbolDictionaries.count) {
@@ -455,8 +455,8 @@ - (void)updateBreakpointsAndIssuesWithCompletion:(void(^)())completion
455455
for(DBGBreakpointAnnotation *breakpointAnnotation in weakSelf.breakpointAnnotationProvider.annotations) {
456456
if(breakpointAnnotation.paragraphRange.location == lineNumber) {
457457
[weakSelf.breakpointsDictionariesaddObject:@{kAnnotationRangeKey : [NSValuevalueWithRange:lineRange],
458-
kAnnotationEnabledKey : @(breakpointAnnotation.enabled),
459-
kAnnotationTypeKey : @(SCXcodeMinimapAnnotationTypeBreakpoint)}];
458+
kAnnotationEnabledKey : @(breakpointAnnotation.enabled),
459+
kAnnotationTypeKey : @(SCXcodeMinimapAnnotationTypeBreakpoint)}];
460460
}
461461
}
462462
}
@@ -473,7 +473,7 @@ - (void)updateBreakpointsAndIssuesWithCompletion:(void(^)())completion
473473
}
474474

475475
[weakSelf.issuesDictionariesaddObject:@{kAnnotationRangeKey : [NSValuevalueWithRange:lineRange],
476-
kAnnotationTypeKey : @(annotationType)}];
476+
kAnnotationTypeKey : @(annotationType)}];
477477
}
478478
}
479479
}
@@ -588,7 +588,7 @@ - (void)handleMouseEvent:(NSEvent *)theEvent
588588
- (void)updateTheme
589589
{
590590
self.editorTheme = [SCXcodeMinimapThememinimapThemeWithTheme:[DVTFontAndColorThemecurrentTheme]];
591-
591+
592592
DVTPreferenceSetManager *preferenceSetManager = [DVTFontAndColorThemepreferenceSetsManager];
593593
NSArray *preferenceSet = [preferenceSetManageravailablePreferenceSets];
594594

@@ -614,9 +614,9 @@ - (void)updateTheme
614614
- (void)updateSize
615615
{
616616
CGFloat zoomLevel = [[[NSUserDefaultsstandardUserDefaults]objectForKey:SCXcodeMinimapZoomLevelKey]doubleValue];
617-
617+
618618
CGFloat minimapWidth = (self.hidden ?0.0f : self.editor.containerView.bounds.size.width * zoomLevel);
619-
619+
620620
NSRect editorScrollViewFrame = self.editor.scrollView.frame;
621621
editorScrollViewFrame.size.width = self.editor.scrollView.superview.frame.size.width - minimapWidth;
622622
self.editor.scrollView.frame = editorScrollViewFrame;
@@ -626,7 +626,7 @@ - (void)updateSize
626626
CGRect frame = self.textView.bounds;
627627
frame.size.width =CGRectGetWidth(self.editorTextView.bounds);
628628
[self.textViewsetFrame:frame];
629-
629+
630630
CGFloat actualZoomLevel =CGRectGetWidth(self.bounds) /CGRectGetWidth(self.editor.textView.bounds);
631631
[self.scrollViewsetMagnification:actualZoomLevel];
632632

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp