-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix about box layout on open. Remove about box from window menu, add …
…expand button to server agreement, add email address highlighting, style server messages, unread badge on admins are red now, play server message sound, some code cleanup.
- Loading branch information
Showing
12 changed files
with
310 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import SwiftUI | ||
|
||
fileprivate class NSWindowAccessorView: NSView { | ||
let executeBlock: (_ window: NSWindow? ) -> () | ||
|
||
init(_ inConfigFunction: @escaping (_ window: NSWindow? ) -> () ) { | ||
executeBlock = inConfigFunction | ||
super.init( frame: NSRect() ) | ||
} | ||
|
||
required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } | ||
|
||
public override func viewDidMoveToWindow() { | ||
super.viewDidMoveToWindow() | ||
executeBlock( self.window ) // We pass it through even if it is nil. | ||
} | ||
} | ||
|
||
public struct NSWindowAccessor: NSViewRepresentable { | ||
var configCode: (_ window: NSWindow? ) -> () | ||
|
||
public init(_ configCode: @escaping (_: NSWindow?) -> Void) { self.configCode = configCode } | ||
public func makeNSView(context: Context) -> NSView { return NSWindowAccessorView( configCode ) } | ||
public func updateNSView(_ nsView: NSView, context: Context) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.