-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
smother transitions and background image
- Loading branch information
Showing
14 changed files
with
184 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// LoginProgressWindowController.swift | ||
// XCredsLoginPlugin | ||
// | ||
// Created by Timothy Perfitt on 8/9/22. | ||
// | ||
|
||
import Cocoa | ||
|
||
class LoginProgressWindowController: NSWindowController { | ||
@IBOutlet weak var backgroundImageView: NSImageView! | ||
|
||
@IBOutlet weak var progressIndicator: NSProgressIndicator! | ||
override func windowDidLoad() { | ||
super.windowDidLoad() | ||
|
||
NotificationCenter.default.addObserver(forName: NSNotification.Name("hideProgress"), object:nil, queue: nil) { notification in | ||
|
||
TCSLogWithMark("gotnotification") | ||
self.window?.close() | ||
|
||
} | ||
|
||
|
||
|
||
progressIndicator.startAnimation(self) | ||
self.window?.canBecomeVisibleWithoutLogin=true | ||
|
||
self.window?.level = .popUpMenu | ||
self.window?.orderFrontRegardless() | ||
|
||
self.window?.backgroundColor = NSColor.systemGray | ||
|
||
self.window?.titlebarAppearsTransparent = true | ||
|
||
self.window?.isMovable = false | ||
|
||
let screenRect = NSScreen.screens[0].frame | ||
self.window?.setFrame(screenRect, display: true, animate: false) | ||
|
||
if let path = UserDefaults.standard.string(forKey: PrefKeys.loginWindowBackgroundImagePath.rawValue) { | ||
let image = NSImage.init(contentsOfFile: path) | ||
image?.size=screenRect.size | ||
backgroundImageView.image = image | ||
|
||
|
||
} | ||
|
||
|
||
} | ||
|
||
} |
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,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner" customClass="LoginProgressWindowController" customModule="XCredsLoginPlugin" customModuleProvider="target"> | ||
<connections> | ||
<outlet property="backgroundImageView" destination="05Z-Sh-7T1" id="bJ2-iT-sLd"/> | ||
<outlet property="progressIndicator" destination="ZHu-Z8-wsF" id="ylp-Zh-yTv"/> | ||
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/> | ||
</connections> | ||
</customObject> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application" customClass="NSObject"/> | ||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titleVisibility="hidden" id="F0z-JX-Cv5"> | ||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> | ||
<rect key="contentRect" x="196" y="240" width="480" height="270"/> | ||
<rect key="screenRect" x="0.0" y="0.0" width="1536" height="935"/> | ||
<view key="contentView" id="se5-gp-TjO"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="05Z-Sh-7T1"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/> | ||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" id="nup-Ni-MvK"/> | ||
</imageView> | ||
<progressIndicator maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="ZHu-Z8-wsF"> | ||
<rect key="frame" x="224" y="119" width="32" height="32"/> | ||
</progressIndicator> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="bottom" secondItem="05Z-Sh-7T1" secondAttribute="bottom" id="7Q8-4b-Aed"/> | ||
<constraint firstItem="ZHu-Z8-wsF" firstAttribute="centerY" secondItem="se5-gp-TjO" secondAttribute="centerY" id="7rU-8b-Pld"/> | ||
<constraint firstItem="05Z-Sh-7T1" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="E0R-e7-hfb"/> | ||
<constraint firstAttribute="trailing" secondItem="05Z-Sh-7T1" secondAttribute="trailing" id="JNy-M3-TSt"/> | ||
<constraint firstItem="05Z-Sh-7T1" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="NnE-Tv-ppE"/> | ||
<constraint firstItem="ZHu-Z8-wsF" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="Yw8-9U-bew"/> | ||
</constraints> | ||
</view> | ||
<connections> | ||
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/> | ||
</connections> | ||
<point key="canvasLocation" x="142" y="144"/> | ||
</window> | ||
</objects> | ||
</document> |
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
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.