Skip to content

Commit

Permalink
Merge develop into master.0.3.6 (18092513)
Browse files Browse the repository at this point in the history
  • Loading branch information
xjbeta committed Sep 25, 2018
2 parents 4f1238d + a23cb71 commit 04c59e8
Show file tree
Hide file tree
Showing 15 changed files with 94 additions and 159 deletions.
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github "1024jp/GzipSwift" "4.0.4"
github "DevMate/DevMateKit" "v1.9"
github "IBM-Swift/BlueSocket" "1.0.16"
github "DevMate/DevMateKit" "v1.9.1"
github "IBM-Swift/BlueSocket" "1.0.17"
github "daltoniam/SwiftHTTP" "3.0.1"
github "facebook/SocketRocket" "0a023409b138039d1ab5ac5431fe61c5f334e86b"
github "utahiosmac/Marshal" "1.2.7"
4 changes: 0 additions & 4 deletions iina+.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
0132B2E32123D05E001EB7DC /* BilibiliCardProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0132B2E22123D05E001EB7DC /* BilibiliCardProgressView.swift */; };
0132B2E52123D68D001EB7DC /* BilibiliCardImageBoxView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0132B2E42123D68D001EB7DC /* BilibiliCardImageBoxView.swift */; };
013850FA214EA2AA003817CE /* huya.js in Resources */ = {isa = PBXBuildFile; fileRef = 013850F9214EA2AA003817CE /* huya.js */; };
01398983210F273200B7042F /* PreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01398982210F273200B7042F /* PreferencesView.swift */; };
01398985210F27A600B7042F /* PreferencesWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01398984210F27A600B7042F /* PreferencesWindowController.swift */; };
01398987210F58E500B7042F /* MainWindowTableRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01398986210F58E500B7042F /* MainWindowTableRowView.swift */; };
01424EB02138EBD500F38C30 /* DanmakuWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01424EAF2138EBD500F38C30 /* DanmakuWindowController.swift */; };
Expand Down Expand Up @@ -149,7 +148,6 @@
0132B2E22123D05E001EB7DC /* BilibiliCardProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BilibiliCardProgressView.swift; sourceTree = "<group>"; };
0132B2E42123D68D001EB7DC /* BilibiliCardImageBoxView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BilibiliCardImageBoxView.swift; sourceTree = "<group>"; };
013850F9214EA2AA003817CE /* huya.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = huya.js; sourceTree = "<group>"; };
01398982210F273200B7042F /* PreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesView.swift; sourceTree = "<group>"; };
01398984210F27A600B7042F /* PreferencesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = "<group>"; };
01398986210F58E500B7042F /* MainWindowTableRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainWindowTableRowView.swift; sourceTree = "<group>"; };
01424EAF2138EBD500F38C30 /* DanmakuWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DanmakuWindowController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -424,7 +422,6 @@
01683DD8211869AE0016A886 /* BilibiliLoginViewController.swift */,
01683DDD211924160016A886 /* BilibiliViewController.swift */,
01F46CA02102EF4600FE9DAD /* GereralViewController.swift */,
01398982210F273200B7042F /* PreferencesView.swift */,
01260170211948BF00C9C639 /* PreferencesTabViewController.swift */,
01398984210F27A600B7042F /* PreferencesWindowController.swift */,
);
Expand Down Expand Up @@ -566,7 +563,6 @@
01010135211EC63D002F0F7F /* MainTabView.swift in Sources */,
01479CD5210AFACB0046AAAD /* AddBookmarkViewController.swift in Sources */,
01479CD7210B35480046AAAD /* MainMenu.swift in Sources */,
01398983210F273200B7042F /* PreferencesView.swift in Sources */,
01F46CA12102EF4600FE9DAD /* GereralViewController.swift in Sources */,
0101012B211DCE1C002F0F7F /* SidebarTableCellView.swift in Sources */,
01F5151A2109F002007C7153 /* LiveStatusTableCellView.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion iina+/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>0.3.5</string>
<string>0.3.6</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>LSApplicationCategoryType</key>
Expand Down
128 changes: 76 additions & 52 deletions iina+/Views/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion iina+/Views/MainWindow/MainTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class MainTabView: NSTabView {

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)


NSColor.controlBackgroundColor.setFill()
dirtyRect.fill()
// Drawing code here.
}

Expand Down
1 change: 0 additions & 1 deletion iina+/Views/MainWindow/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ class MainViewController: NSViewController {
super.viewDidLoad()
loadBilibiliCards()
bookmarkArrayController.sortDescriptors = dataManager.sortDescriptors
bookmarkTableView.backgroundColor = .clear
bookmarkTableView.registerForDraggedTypes([.bookmarkRow])
bookmarkTableView.draggingDestinationFeedbackStyle = .gap
NotificationCenter.default.addObserver(self, selector: #selector(reloadTableView), name: .reloadMainWindowTableView, object: nil)
Expand Down
1 change: 0 additions & 1 deletion iina+/Views/MainWindow/MainWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class MainWindowController: NSWindowController, NSWindowDelegate {
override func windowDidLoad() {
super.windowDidLoad()
window?.isMovableByWindowBackground = true
window?.backgroundColor = NSColor(red:0.86, green:0.89, blue:0.94, alpha:1.00)
window?.titlebarAppearsTransparent = true
window?.titleVisibility = .hidden
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,11 @@ import Cocoa

class BilibiliCardTableCellView: NSTableCellView {

var isSelected: Bool = false {
didSet {
needsDisplay = true
}
}
@IBOutlet weak var imageBoxView: BilibiliCardImageBoxView!

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

let selectionRect = NSInsetRect(bounds, 0, 0)
let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 3, yRadius: 3)
if isSelected {
NSColor.customHighlightColor.setFill()
} else {
NSColor.white.setFill()
}
selectionPath.fill()
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ class LiveStatusTableCellView: NSTableCellView {
@IBOutlet weak var titleTextField: NSTextField!
@IBOutlet weak var nameTextField: NSTextField!

var isSelected: Bool = false {
didSet {
needsDisplay = true
}
}

var url: URL? {
didSet {
getInfo()
Expand All @@ -29,15 +23,6 @@ class LiveStatusTableCellView: NSTableCellView {

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

let selectionRect = NSInsetRect(bounds, 0, 0)
let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 3, yRadius: 3)
if isSelected {
NSColor.customHighlightColor.setFill()
} else {
NSColor.white.setFill()
}
selectionPath.fill()

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,10 @@
import Cocoa

class LiveUrlTableCellView: NSTableCellView {

var isSelected: Bool = false {
didSet {
needsDisplay = true
}
}

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

let selectionRect = NSInsetRect(bounds, 0, 0)
let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 3, yRadius: 3)
if isSelected {
NSColor.customHighlightColor.setFill()
} else {
NSColor.white.setFill()
}
selectionPath.fill()

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,20 @@ class MainWindowTableRowView: NSTableRowView {
override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)
}

override var isSelected: Bool {
didSet {
if let cell = subviews.first as? LiveStatusTableCellView {
cell.isSelected = isSelected
} else if let cell = subviews.first as? LiveUrlTableCellView {
cell.isSelected = isSelected
} else if let cell = subviews.first as? BilibiliCardTableCellView {
cell.isSelected = isSelected
} else if let cell = subviews.first as? SuggestionsTableCellView {
cell.isSelected = isSelected
}
}
}


override func drawFocusRingMask() {
let selectionRect = NSInsetRect(bounds, 0, 0)
NSBezierPath(roundedRect: selectionRect, xRadius: 6, yRadius: 6).fill()
}

override func drawSelection(in dirtyRect: NSRect) {
guard selectionHighlightStyle == .regular else {
super.drawSelection(in: dirtyRect)
return
}

isEmphasized ? NSColor.systemBlue.setFill() : NSColor.secondarySelectedControlColor.setFill()
NSBezierPath(roundedRect: dirtyRect, xRadius: 5, yRadius: 5).fill()

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ import Cocoa

class SuggestionsTableCellView: NSTableCellView {

var isSelected: Bool = false {
didSet {
needsDisplay = true
}
}

override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

let selectionRect = NSInsetRect(bounds, 0, 0)
let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 3, yRadius: 3)
if isSelected {
NSColor.customHighlightColor.setFill()
} else {
NSColor.white.setFill()
}
selectionPath.fill()

}

func setStream(_ stream: (key: String, value: Stream)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class WaitingTableCellView: NSTableCellView {
override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)

let selectionRect = NSInsetRect(bounds, 0, 0)
let selectionPath = NSBezierPath(roundedRect: selectionRect, xRadius: 3, yRadius: 3)
NSColor.white.setFill()
selectionPath.fill()
}
enum Status {
case waiting, error
Expand Down
19 changes: 0 additions & 19 deletions iina+/Views/Preferences/PreferencesView.swift

This file was deleted.

1 change: 0 additions & 1 deletion iina+/Views/Preferences/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class PreferencesWindowController: NSWindowController {
override func windowDidLoad() {
super.windowDidLoad()
window?.isMovableByWindowBackground = true
window?.backgroundColor = .customHighlightColor
window?.titlebarAppearsTransparent = true
window?.titleVisibility = .hidden

Expand Down

0 comments on commit 04c59e8

Please sign in to comment.