-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement
MenuBarAppearancePanel
(#14)
* Begin implementing new MenuBarAppearancePanel * Tweaks * Only update a control item's window frame when it intersects with its screen * Update MenuBarAppearancePanel.swift * Refactoring * Prevent MenuBarAppearancePanel from showing again if ordered out * Refactoring * Update MenuBarAppearancePanel.swift * Workaround for full screen * Better workaround for full screen * Refactoring * Make new appearance panel work with `MenuBarShapeKind.none` * Update MenuBarAppearancePanel.swift * Update MenuBarAppearancePanel.swift * Remove old appearance panel and its subtypes * A comment * Move ScreenshotManager functionality to ScreenCaptureManager * Update MenuBarAppearancePanel.swift * Minor tweaks * Fix for multiple appearance panels appearing on the same screen * Update MenuBarAppearancePanel.swift * Remove unnecessary redundancy
- Loading branch information
1 parent
3850bc8
commit 815f491
Showing
10 changed files
with
1,066 additions
and
944 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSScreen+displayID.swift | ||
// Ice | ||
// | ||
|
||
import Cocoa | ||
|
||
extension NSScreen { | ||
/// The display identifier of the screen. | ||
var displayID: CGDirectDisplayID { | ||
// deviceDescription is guaranteed to always have an NSScreenNumber key, so a force unwrap here is okay | ||
let screenNumber = deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")]! // swiftlint:disable:this force_unwrapping | ||
return screenNumber as! CGDirectDisplayID // swiftlint:disable:this force_cast | ||
} | ||
} |
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.