diff --git a/XCreds/MainLoginWindowController.swift b/XCreds/MainLoginWindowController.swift
index 6fede2b6..b16ff50c 100644
--- a/XCreds/MainLoginWindowController.swift
+++ b/XCreds/MainLoginWindowController.swift
@@ -103,14 +103,6 @@ class MainLoginWindowController: NSWindowController,NSWindowDelegate {
let backgroundImage = DefaultsHelper.backgroundImage()
TCSLogWithMark()
- if let backgroundImage = backgroundImage {
- backgroundImage.size=screenRect.size
- self.backgroundImageView.image=backgroundImage
- self.backgroundImageView.imageScaling = .scaleProportionallyUpOrDown
-
- self.backgroundImageView.frame=NSMakeRect(screenRect.origin.x, screenRect.origin.y, screenRect.size.width, screenRect.size.height-100)
-
- }
self.window?.level = .normal
if self.controlsViewController==nil {
@@ -180,27 +172,37 @@ class MainLoginWindowController: NSWindowController,NSWindowDelegate {
}
fileprivate func createBackground() {
+ TCSLogWithMark()
+
let backgroundImage = DefaultsHelper.backgroundImage()
let screenRect = NSScreen.screens[0].frame
- TCSLogWithMark()
+ var newHeight = screenRect.height
+ var newWidth = screenRect.width
+
if let backgroundImage = backgroundImage {
- TCSLogWithMark()
- backgroundImageView.image?.size=screenRect.size
- TCSLogWithMark()
- backgroundImageView.image=backgroundImage
- TCSLogWithMark()
+ if UserDefaults.standard.bool(forKey: PrefKeys.shouldLoginWindowBackgroundImageFillScreen.rawValue) == false {
+ let ratio = backgroundImage.size.width/backgroundImage.size.height
+ newHeight = screenRect.size.height
+ newWidth = screenRect.size.height * ratio
+
+ if newWidth > screenRect.size.width {
+ newWidth = screenRect.size.width
+ newHeight = screenRect.size.width / ratio
+ }
+
+ }
+
- backgroundImage.size=screenRect.size
- TCSLogWithMark()
+
+ backgroundImage.size.height = newHeight
+ backgroundImage.size.width = newWidth
+ backgroundImageView.image=backgroundImage
backgroundImageView.imageScaling = .scaleProportionallyUpOrDown
- TCSLogWithMark()
backgroundImageView.frame=NSMakeRect(screenRect.origin.x, screenRect.origin.y, screenRect.size.width, screenRect.size.height-100)
- TCSLogWithMark()
}
- TCSLogWithMark()
}
func recenterCenterView() {
diff --git a/XCreds/PreferencesWindow.xib b/XCreds/PreferencesWindow.xib
index b30d0a2c..58e731ae 100644
--- a/XCreds/PreferencesWindow.xib
+++ b/XCreds/PreferencesWindow.xib
@@ -18,7 +18,7 @@
-
+
diff --git a/XCredsLoginPlugIn/LoginWindow/SignInWindowController.swift b/XCredsLoginPlugIn/LoginWindow/SignInWindowController.swift
index 9b2eb348..c976ea5d 100644
--- a/XCredsLoginPlugIn/LoginWindow/SignInWindowController.swift
+++ b/XCredsLoginPlugIn/LoginWindow/SignInWindowController.swift
@@ -142,12 +142,6 @@ protocol UpdateCredentialsFeedbackProtocol {
self.view.wantsLayer=true
self.view.layer?.backgroundColor = CGColor(red: 0.3, green: 0.3, blue: 0.3, alpha: 0.4)
-
- if UserDefaults.standard.bool(forKey: PrefKeys.shouldLoginWindowBackgroundImageFillScreen.rawValue) == true {
-
- self.view.layer?.contentsGravity = CALayerContentsGravity.resizeAspectFill
- }
-
localOnlyCheckBox.isEnabled=true
localOnlyView.isHidden=false
// make things look better
diff --git a/xCreds.xcodeproj/project.pbxproj b/xCreds.xcodeproj/project.pbxproj
index aa100973..d12534f6 100644
--- a/xCreds.xcodeproj/project.pbxproj
+++ b/xCreds.xcodeproj/project.pbxproj
@@ -1440,7 +1440,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
@@ -1477,7 +1477,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = UXP6YEHSPW;
FRAMEWORK_SEARCH_PATHS = (
@@ -1598,7 +1598,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -1635,7 +1635,7 @@
CODE_SIGN_ENTITLEMENTS = "XCreds Login Overlay/XCreds_Login_Overlay.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -1785,7 +1785,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -1827,7 +1827,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 6374;
+ CURRENT_PROJECT_VERSION = 6399;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
diff --git a/xCreds.xcodeproj/project.xcworkspace/xcuserdata/tperfitt.xcuserdatad/UserInterfaceState.xcuserstate b/xCreds.xcodeproj/project.xcworkspace/xcuserdata/tperfitt.xcuserdatad/UserInterfaceState.xcuserstate
index 5853244a..2da9b739 100644
Binary files a/xCreds.xcodeproj/project.xcworkspace/xcuserdata/tperfitt.xcuserdatad/UserInterfaceState.xcuserstate and b/xCreds.xcodeproj/project.xcworkspace/xcuserdata/tperfitt.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/xCreds.xcodeproj/xcuserdata/tperfitt.xcuserdatad/xcschemes/xcschememanagement.plist b/xCreds.xcodeproj/xcuserdata/tperfitt.xcuserdatad/xcschemes/xcschememanagement.plist
index dca28b60..937f95d7 100644
--- a/xCreds.xcodeproj/xcuserdata/tperfitt.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/xCreds.xcodeproj/xcuserdata/tperfitt.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -32,7 +32,7 @@
auth_mech_fixup.xcscheme_^#shared#^_
orderHint
- 7
+ 6
authrights.xcscheme_^#shared#^_
@@ -42,7 +42,7 @@
test.xcscheme_^#shared#^_
orderHint
- 6
+ 7
SuppressBuildableAutocreation