Skip to content

Commit

Permalink
user can make lyrics higher or lower in auto layout mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRow authored and MichaelRow committed Dec 2, 2015
1 parent 9635335 commit 8792d66
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 51 deletions.
6 changes: 3 additions & 3 deletions Lyrics/AppController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class AppController: NSObject {

NSBundle(forClass: object_getClass(self)).loadNibNamed("StatusMenu", owner: self, topLevelObjects: nil)
setupStatusItem()
statusBarMenu.itemAtIndex(6)?.image = NSImage(named: "red_dot")

lyricsWindow=LyricsWindowController()
lyricsWindow.showWindow(nil)
Expand Down Expand Up @@ -150,11 +149,12 @@ class AppController: NSObject {
// MARK: - Interface Methods

@IBAction func handleWorkSpaceChange(sender:AnyObject?) {
//before finding the way to detect full screen, user should adjust lyrics by selves
lyricsWindow.isFullScreen = !lyricsWindow.isFullScreen
if lyricsWindow.isFullScreen {
statusBarMenu.itemAtIndex(6)?.image = NSImage(named: "green_dot")
statusBarMenu.itemAtIndex(6)?.title = NSLocalizedString("HIGHER_LYRICS", comment: "")
} else {
statusBarMenu.itemAtIndex(6)?.image = NSImage(named: "red_dot")
statusBarMenu.itemAtIndex(6)?.title = NSLocalizedString("LOWER_LYRICS", comment: "")
}
dispatch_async(dispatch_get_main_queue()) { () -> Void in
self.lyricsWindow.reflash()
Expand Down
22 changes: 0 additions & 22 deletions Lyrics/Assets.xcassets/green_dot.imageset/Contents.json

This file was deleted.

Binary file not shown.
Binary file not shown.
22 changes: 0 additions & 22 deletions Lyrics/Assets.xcassets/red_dot.imageset/Contents.json

This file was deleted.

Binary file removed Lyrics/Assets.xcassets/red_dot.imageset/red_dot.png
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Lyrics/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@
// Notification
"NO_PLAYING_TRACK"="No Playing Track";
"IGNORE_LYRICS"="Ignored lyrics from LrcSeeker.";

// menu bar
"HIGHER_LYRICS"="Higher Lyrics";
"LOWER_LYRICS"="Lower Lyrics";

8 changes: 7 additions & 1 deletion Lyrics/Base.lproj/StatusMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="txX-dr-HGn"/>
<menuItem title="In Full Screen Mode" id="UNY-Ob-RmT">
<menuItem title="Higher Lyrics" id="UNY-Ob-RmT">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="handleWorkSpaceChange:" target="-2" id="lLA-li-Fau"/>
<binding destination="Ppe-ZY-ULn" name="hidden" keyPath="values.LyricsUseAutoLayout" id="jIB-go-ZVW">
<dictionary key="options">
<bool key="NSRaisesForNotApplicableKeys" value="NO"/>
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="lfR-h4-Fcs"/>
Expand Down
2 changes: 1 addition & 1 deletion Lyrics/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.5</string>
<string>1.0.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSMinimumSystemVersion</key>
Expand Down
3 changes: 3 additions & 0 deletions Lyrics/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@
"NO_PLAYING_TRACK"="没有播放中的音乐";
"IGNORE_LYRICS"="忽略来自LrcSeeker的歌词";

// menu bar
"HIGHER_LYRICS"="提高歌词位置";
"LOWER_LYRICS"="降低歌词位置";
8 changes: 7 additions & 1 deletion Lyrics/zh-Hans.lproj/StatusMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="lfR-h4-Fcs"/>
<menuItem title="全屏模式中" id="tks-GA-GZ6">
<menuItem title="降低歌词位置" id="tks-GA-GZ6">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="handleWorkSpaceChange:" target="-2" id="xnu-uL-rDm"/>
<binding destination="VKQ-E3-KXV" name="hidden" keyPath="values.LyricsUseAutoLayout" id="NSd-Ej-sCe">
<dictionary key="options">
<bool key="NSRaisesForNotApplicableKeys" value="NO"/>
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="NeM-rI-mss"/>
Expand Down
3 changes: 3 additions & 0 deletions Lyrics/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@
"NO_PLAYING_TRACK"="沒有播放中的音樂";
"IGNORE_LYRICS"="忽略來自LrcSeeker的歌詞";

// menu bar
"HIGHER_LYRICS"="提高歌詞位置";
"LOWER_LYRICS"="降低歌詞位置";
8 changes: 7 additions & 1 deletion Lyrics/zh-Hant.lproj/StatusMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="8H9-gJ-UYS"/>
<menuItem title="全屏模式中" id="CES-ME-bZV">
<menuItem title="降低歌詞位置" id="CES-ME-bZV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="handleWorkSpaceChange:" target="-2" id="qIP-yv-s1c"/>
<binding destination="ulf-d7-gEq" name="hidden" keyPath="values.LyricsUseAutoLayout" id="9mK-ed-8qR">
<dictionary key="options">
<bool key="NSRaisesForNotApplicableKeys" value="NO"/>
<string key="NSValueTransformerName">NSNegateBoolean</string>
</dictionary>
</binding>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="lfR-h4-Fcs"/>
Expand Down

0 comments on commit 8792d66

Please sign in to comment.