From 03dc7a6e60361da8940b0ebf7f92331ed83b242e Mon Sep 17 00:00:00 2001 From: Kai Azim Date: Fri, 14 Jun 2024 18:00:23 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20Remove=20dead=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop.xcodeproj/project.pbxproj | 28 --- .../xcshareddata/swiftpm/Package.resolved | 2 +- Loop/About Window/AboutView.swift | 163 ------------------ Loop/About Window/AboutViewController.swift | 33 ---- Loop/Localizable.xcstrings | 20 +-- Loop/LoopApp.swift | 7 - Loop/Luminare/Loop/AboutConfiguration.swift | 2 +- Loop/Settings/GeneralSettingsView.swift | 49 ------ Loop/Window Management/WindowDirection.swift | 4 - 9 files changed, 11 insertions(+), 297 deletions(-) delete mode 100644 Loop/About Window/AboutView.swift delete mode 100644 Loop/About Window/AboutViewController.swift delete mode 100644 Loop/Settings/GeneralSettingsView.swift diff --git a/Loop.xcodeproj/project.pbxproj b/Loop.xcodeproj/project.pbxproj index 74d76294..25264a0b 100644 --- a/Loop.xcodeproj/project.pbxproj +++ b/Loop.xcodeproj/project.pbxproj @@ -21,7 +21,6 @@ A81B98182BDC854F005FD78C /* AboutConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81B98172BDC854F005FD78C /* AboutConfiguration.swift */; }; A81D8D0A2C068B8700188E12 /* LuminarePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81D8D092C068B8700188E12 /* LuminarePreviewView.swift */; }; A81D8D0C2C06950000188E12 /* LuminareManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81D8D0B2C06950000188E12 /* LuminareManager.swift */; }; - A82521EC29E234EB00139654 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A82521EB29E234EB00139654 /* AboutViewController.swift */; }; A82521EE29E235AC00139654 /* PermissionsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A82521ED29E235AC00139654 /* PermissionsManager.swift */; }; A82740982AB00FCE00B9BDC5 /* Color+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A82740972AB00FCE00B9BDC5 /* Color+Extensions.swift */; }; A827409A2AB0208500B9BDC5 /* TriggerKeycorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A82740992AB0208500B9BDC5 /* TriggerKeycorder.swift */; }; @@ -60,7 +59,6 @@ A87DDD152B50A6A400A32C76 /* ScreenManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A87DDD142B50A6A400A32C76 /* ScreenManager.swift */; }; A87F78942BAE28050087B1DE /* CustomWindowActionSizeMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A87F78932BAE28050087B1DE /* CustomWindowActionSizeMode.swift */; }; A87F78962BAE333C0087B1DE /* CustomWindowActionPositionMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A87F78952BAE333C0087B1DE /* CustomWindowActionPositionMode.swift */; }; - A882660829809F6F00BCB197 /* GeneralSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A882660729809F6F00BCB197 /* GeneralSettingsView.swift */; }; A883642F298B7288005D6C19 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A883642E298B7288005D6C19 /* ServiceManagement.framework */; }; A8878A252AA3B2C800850A66 /* WindowTransformAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8878A242AA3B2C800850A66 /* WindowTransformAnimation.swift */; }; A88E27AD2BDDE5300042CF04 /* CustomActionConfigurationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88E27AC2BDDE5300042CF04 /* CustomActionConfigurationView.swift */; }; @@ -81,7 +79,6 @@ A8D6D3032B6C8D750061B11F /* PaddingPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8D6D3022B6C8D750061B11F /* PaddingPreviewView.swift */; }; A8D6D3052B6C92F20061B11F /* WallpaperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8D6D3042B6C92F20061B11F /* WallpaperView.swift */; }; A8DCC97B2980D5F500D41065 /* Defaults in Frameworks */ = {isa = PBXBuildFile; productRef = A8DCC97A2980D5F500D41065 /* Defaults */; }; - A8E1575F298654960005761C /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E1575E298654960005761C /* AboutView.swift */; }; A8E4C7AE2C17D7B600A303C3 /* Luminare in Frameworks */ = {isa = PBXBuildFile; productRef = A8E4C7AD2C17D7B600A303C3 /* Luminare */; }; A8E59C39297F5E9A0064D4BA /* LoopApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E59C38297F5E9A0064D4BA /* LoopApp.swift */; }; A8E59C3D297F5E9B0064D4BA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A8E59C3C297F5E9B0064D4BA /* Assets.xcassets */; }; @@ -108,7 +105,6 @@ A81B98172BDC854F005FD78C /* AboutConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutConfiguration.swift; sourceTree = ""; }; A81D8D092C068B8700188E12 /* LuminarePreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuminarePreviewView.swift; sourceTree = ""; }; A81D8D0B2C06950000188E12 /* LuminareManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuminareManager.swift; sourceTree = ""; }; - A82521EB29E234EB00139654 /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; A82521ED29E235AC00139654 /* PermissionsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsManager.swift; sourceTree = ""; }; A82740972AB00FCE00B9BDC5 /* Color+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; A82740992AB0208500B9BDC5 /* TriggerKeycorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TriggerKeycorder.swift; sourceTree = ""; }; @@ -148,7 +144,6 @@ A87DDD142B50A6A400A32C76 /* ScreenManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenManager.swift; sourceTree = ""; }; A87F78932BAE28050087B1DE /* CustomWindowActionSizeMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomWindowActionSizeMode.swift; sourceTree = ""; }; A87F78952BAE333C0087B1DE /* CustomWindowActionPositionMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomWindowActionPositionMode.swift; sourceTree = ""; }; - A882660729809F6F00BCB197 /* GeneralSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralSettingsView.swift; sourceTree = ""; }; A883642E298B7288005D6C19 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; }; A8878A242AA3B2C800850A66 /* WindowTransformAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowTransformAnimation.swift; sourceTree = ""; }; A88E27AC2BDDE5300042CF04 /* CustomActionConfigurationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomActionConfigurationView.swift; sourceTree = ""; }; @@ -168,7 +163,6 @@ A8D6D3002B6C894C0061B11F /* PaddingModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaddingModel.swift; sourceTree = ""; }; A8D6D3022B6C8D750061B11F /* PaddingPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaddingPreviewView.swift; sourceTree = ""; }; A8D6D3042B6C92F20061B11F /* WallpaperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperView.swift; sourceTree = ""; }; - A8E1575E298654960005761C /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = ""; }; A8E59C35297F5E9A0064D4BA /* Loop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Loop.app; sourceTree = BUILT_PRODUCTS_DIR; }; A8E59C38297F5E9A0064D4BA /* LoopApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoopApp.swift; sourceTree = ""; }; A8E59C3C297F5E9B0064D4BA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -215,15 +209,6 @@ path = Utilities; sourceTree = ""; }; - A82521EA29E2349700139654 /* About Window */ = { - isa = PBXGroup; - children = ( - A82521EB29E234EB00139654 /* AboutViewController.swift */, - A8E1575E298654960005761C /* AboutView.swift */, - ); - path = "About Window"; - sourceTree = ""; - }; A82B1AF32BD35C5900E2F3F9 /* Theming */ = { isa = PBXGroup; children = ( @@ -346,14 +331,6 @@ path = "Radial Menu"; sourceTree = ""; }; - A88265FC298092B500BCB197 /* Settings */ = { - isa = PBXGroup; - children = ( - A882660729809F6F00BCB197 /* GeneralSettingsView.swift */, - ); - path = Settings; - sourceTree = ""; - }; A883642D298B7288005D6C19 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -445,10 +422,8 @@ A83EEEB02AD46BAC00F3EA2D /* MenuBar */, A864F4662AA65EC200579738 /* Window Management */, A8330ABB2A3AC05200673C8D /* Managers */, - A82521EA29E2349700139654 /* About Window */, A88265FB29808E0D00BCB197 /* Radial Menu */, A88265FA29808DED00BCB197 /* Preview Window */, - A88265FC298092B500BCB197 /* Settings */, A80900D12AA3F9F20085C63B /* Utilities */, A8330AD52A3AC29C00673C8D /* Extensions */, A8E59C3C297F5E9B0064D4BA /* Assets.xcassets */, @@ -558,7 +533,6 @@ A82B1AF02BD357FC00E2F3F9 /* RadialMenuConfiguration.swift in Sources */, A8D5A7D62A91384D004EA5BB /* DirectionSelectorSquareSegment.swift in Sources */, A8A583BA2BE5A8D8005F4CB2 /* KeybindingItem.swift in Sources */, - A82521EC29E234EB00139654 /* AboutViewController.swift in Sources */, A8D6D3012B6C894C0061B11F /* PaddingModel.swift in Sources */, A88E27AD2BDDE5300042CF04 /* CustomActionConfigurationView.swift in Sources */, A87F78942BAE28050087B1DE /* CustomWindowActionSizeMode.swift in Sources */, @@ -578,7 +552,6 @@ A80900D52AA3F9F30085C63B /* VisualEffectView.swift in Sources */, A8330AC12A3AC13100673C8D /* Defaults+Extensions.swift in Sources */, A8A1C51E2BD3705A00515A14 /* PaddingConfigurationView.swift in Sources */, - A8E1575F298654960005761C /* AboutView.swift in Sources */, A87376F62AA288EB001890F4 /* Window.swift in Sources */, A8B5E1632B43726C00044D30 /* CustomWindowActionAnchor.swift in Sources */, A8055EC22AFEDE0B00459D13 /* Keycorder.swift in Sources */, @@ -595,7 +568,6 @@ A8330AD42A3AC27600673C8D /* WindowDirection.swift in Sources */, A81D8D0A2C068B8700188E12 /* LuminarePreviewView.swift in Sources */, A8789F6929805B340040512E /* PreviewView.swift in Sources */, - A882660829809F6F00BCB197 /* GeneralSettingsView.swift in Sources */, A8E59C50298045D90064D4BA /* PreviewController.swift in Sources */, A81989062AC8EDB300EFF7A1 /* MenuBarHeaderText.swift in Sources */, A81B98182BDC854F005FD78C /* AboutConfiguration.swift in Sources */, diff --git a/Loop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Loop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e24fe29c..54676767 100644 --- a/Loop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Loop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "c2a93a9d7a879ed92e3a49ac894535c44c007c6516c13aaedf4acff1c43a7b4a", + "originHash" : "c455e625308edd2c92a7026204c191ce39495daeab87d401ff9a8d1e640efef4", "pins" : [ { "identity" : "defaults", diff --git a/Loop/About Window/AboutView.swift b/Loop/About Window/AboutView.swift deleted file mode 100644 index 84f7b1eb..00000000 --- a/Loop/About Window/AboutView.swift +++ /dev/null @@ -1,163 +0,0 @@ -// -// AboutView.swift -// Loop -// -// Created by Kai Azim on 2023-01-29. -// - -import SwiftUI - -struct PackageDescription { - var name: String - var url: URL - var license: URL -} - -struct AboutView: View { - @Environment(\.openURL) private var openURL - - @State private var isShowingAcknowledgements = false - - let packages: [PackageDescription] = [ - PackageDescription( - name: "Defaults", - url: URL( - string: "https://github.com/sindresorhus/Defaults" - )!, - license: URL(string: "https://github.com/sindresorhus/Defaults/blob/main/license")! - ), - PackageDescription( - name: "MenuBarExtraAccess", - url: URL( - string: "https://github.com/orchetect/MenuBarExtraAccess" - )!, - license: URL(string: "https://github.com/orchetect/MenuBarExtraAccess/blob/main/LICENSE")! - ), - PackageDescription( - name: "SettingsAccess", - url: URL( - string: "https://github.com/orchetect/SettingsAccess" - )!, - license: URL( - string: "https://github.com/orchetect/SettingsAccess/blob/main/LICENSE" - )! - ), - PackageDescription( - name: "Sparkle", - url: URL( - string: "https://sparkle-project.org" - )!, - license: URL( - string: "https://github.com/sparkle-project/Sparkle/blob/2.x/LICENSE" - )! - ), - PackageDescription( - name: "Swift Algorithms", - url: URL( - string: "https://github.com/apple/swift-algorithms" - )!, - license: URL(string: "https://github.com/apple/swift-algorithms/blob/main/LICENSE.txt")! - ) - ] - - var body: some View { - VStack { - VStack(spacing: 5) { - Image(nsImage: NSImage(named: IconManager.currentAppIcon.iconName)!) - .resizable() - .frame(width: 120, height: 120) - - Text("\(Bundle.main.appName)") - .font(.title) - .fontWeight(.bold) - - Button(action: { - let pasteboard = NSPasteboard.general - pasteboard.clearContents() - pasteboard.setString( - "Version \(Bundle.main.appVersion) (\(Bundle.main.appBuild))", - forType: NSPasteboard.PasteboardType.string - ) - }, label: { - let versionText = String( - localized: "Version \(Bundle.main.appVersion) (\(Bundle.main.appBuild))" - ) - Text("\(versionText) \(Image(systemName: "doc.on.clipboard"))") - .font(.caption2) - .foregroundColor(.secondary) - }) - .buttonStyle(.plain) - } - - Spacer() - - Text("The elegant, mouse-oriented window manager.") - .multilineTextAlignment(.center) - - Spacer() - - Button { - openURL(URL(string: "https://github.com/MrKai77/Loop")!) - } label: { - Text("GitHub") - .foregroundColor(.primary) - .frame(maxWidth: .infinity) - } - .controlSize(.large) - - Button { - isShowingAcknowledgements = true - } label: { - Text("Acknowledgements") - .foregroundColor(.primary) - .frame(maxWidth: .infinity) - } - .controlSize(.large) - .popover(isPresented: $isShowingAcknowledgements) { - VStack { - ForEach(0 ..< packages.count, id: \.self) { idx in - HStack { - Text(packages[idx].name) - Spacer() - - Button(action: { - openURL(packages[idx].url) - }, label: { - Image(systemName: "safari") - }) - .help("Link") - - Button(action: { - openURL(packages[idx].license) - }, label: { - Image(systemName: "scroll") - }) - .help("License") - } - .frame(width: 180) - .buttonStyle(.link) - .tag(idx) - .padding(.vertical, 2) - } - } - .padding(10) - } - - Link(destination: URL(string: "https://github.com/MrKai77/Loop/blob/release/LICENSE")!) { - Text("MIT License") - .underline() - .font(.caption) - .textSelection(.disabled) - .foregroundColor(.secondary) - } - - Text(Bundle.main.copyright) - .textSelection(.disabled) - .foregroundColor(.secondary) - .font(.caption) - } - .padding(20) - .frame(width: 260, height: 380) - .background(VisualEffectView(material: .hudWindow, blendingMode: .behindWindow).ignoresSafeArea()) - } -} diff --git a/Loop/About Window/AboutViewController.swift b/Loop/About Window/AboutViewController.swift deleted file mode 100644 index 79596ef1..00000000 --- a/Loop/About Window/AboutViewController.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// AboutViewController.swift -// Loop -// -// Created by Kai Azim on 2023-04-08. -// - -import SwiftUI - -class AboutViewController { - var aboutWindowController: NSWindowController? - - func open() { - if aboutWindowController == nil { - let window = NSWindow() - window.styleMask = [.closable, .titled, .fullSizeContentView] - window.title = .init(localized: .init("About", defaultValue: "About \(Bundle.main.appName)")) - window.contentView = NSHostingView(rootView: AboutView()) - window.titlebarAppearsTransparent = true - window.standardWindowButton(.miniaturizeButton)?.isHidden = true - window.standardWindowButton(.zoomButton)?.isHidden = true - window.isMovableByWindowBackground = true - window.center() - aboutWindowController = .init(window: window) - } else { - // Refresh view, in case user changed app icon - aboutWindowController?.window?.contentView = NSHostingView(rootView: AboutView()) - } - - aboutWindowController?.showWindow(aboutWindowController?.window) - aboutWindowController?.window?.orderFrontRegardless() - } -} diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index 2ef6c48f..f771df95 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -125,23 +125,17 @@ }, "About" : { - "extractionState" : "extracted_with_value", "localizations" : { - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "About %@" - } - }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "关于%@" } } } }, "About %@" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -206,6 +200,7 @@ } }, "Acknowledgements" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -272,6 +267,7 @@ } }, "App Icon" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -937,9 +933,6 @@ } } } - }, - "GitHub" : { - }, "Gradient" : { @@ -1411,6 +1404,7 @@ } }, "License" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -1421,6 +1415,7 @@ } }, "Link" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -1434,6 +1429,7 @@ }, "Loop more to unlock new icons! (You've looped %lld times!)" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -1469,6 +1465,7 @@ } }, "MIT License" : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { @@ -2140,6 +2137,7 @@ } }, "The elegant, mouse-oriented window manager." : { + "extractionState" : "stale", "localizations" : { "zh-Hans" : { "stringUnit" : { diff --git a/Loop/LoopApp.swift b/Loop/LoopApp.swift index 87043f45..d55d492b 100644 --- a/Loop/LoopApp.swift +++ b/Loop/LoopApp.swift @@ -12,7 +12,6 @@ import SwiftUI @main struct LoopApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate - let aboutViewController = AboutViewController() @State var isMenubarItemPresented: Bool = false @Default(.hideMenuBarIcon) var hideMenuBarIcon @@ -61,12 +60,6 @@ struct LoopApp: App { } .keyboardShortcut(",", modifiers: .command) - Button("About \(Bundle.main.appName)") { - NSApp.setActivationPolicy(.regular) - aboutViewController.open() - } - .keyboardShortcut("i", modifiers: .command) - Divider() Button("Quit") { diff --git a/Loop/Luminare/Loop/AboutConfiguration.swift b/Loop/Luminare/Loop/AboutConfiguration.swift index 02dcaa6c..badd66bd 100644 --- a/Loop/Luminare/Loop/AboutConfiguration.swift +++ b/Loop/Luminare/Loop/AboutConfiguration.swift @@ -108,7 +108,7 @@ struct AboutConfigurationView: View { Text("Loop") .fontWeight(.medium) - Text(model.isHoveringOverVersionCopier ? + Text(model.isHoveringOverVersionCopier ? "Version \(Bundle.main.appVersion) (\(Bundle.main.appBuild))" : "You've looped \(timesLooped) times!" ) diff --git a/Loop/Settings/GeneralSettingsView.swift b/Loop/Settings/GeneralSettingsView.swift deleted file mode 100644 index 85c7f28d..00000000 --- a/Loop/Settings/GeneralSettingsView.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// GeneralSettingsView.swift -// Loop -// -// Created by Kai Azim on 2023-01-24. -// - -import Defaults -import ServiceManagement -import SwiftUI - -struct GeneralSettingsView: View { - @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate - - @Default(.launchAtLogin) var launchAtLogin - @Default(.hideMenuBarIcon) var hideMenuBarIcon - @Default(.useSystemAccentColor) var useSystemAccentColor - @Default(.customAccentColor) var customAccentColor - @Default(.useGradient) var useGradient - @Default(.gradientColor) var gradientColor - @Default(.currentIcon) var currentIcon - @Default(.notificationWhenIconUnlocked) var notificationWhenIconUnlocked - @Default(.timesLooped) var timesLooped - @Default(.padding) var padding - @Default(.windowSnapping) var windowSnapping - @Default(.animationConfiguration) var animationConfiguration - @Default(.restoreWindowFrameOnDrag) var restoreWindowFrameOnDrag - @Default(.resizeWindowUnderCursor) var resizeWindowUnderCursor - @Default(.focusWindowOnResize) var focusWindowOnResize - - @State var userDisabledLoopNotifications: Bool = false - - @State var isConfiguringPadding: Bool = false - - var body: some View { - Form { - Section("App Icon") { - VStack(alignment: .leading) { - Text("Loop more to unlock new icons! (You've looped \(timesLooped) times!)") - .font(.caption) - .foregroundColor(.secondary) - .textSelection(.enabled) - } - } - } - .formStyle(.grouped) - .scrollDisabled(true) - } -} diff --git a/Loop/Window Management/WindowDirection.swift b/Loop/Window Management/WindowDirection.swift index f729e55f..0608542e 100644 --- a/Loop/Window Management/WindowDirection.swift +++ b/Loop/Window Management/WindowDirection.swift @@ -215,7 +215,6 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable { CGRect(x: 0.5 / 10.0, y: 0.5 / 10.0, width: 9.0 / 10.0, height: 9.0 / 10.0) case .fullscreen: CGRect(x: 0, y: 0, width: 1.0, height: 1.0) - // Halves case .topHalf: CGRect(x: 0, y: 0, width: 1.0, height: 1.0 / 2.0) @@ -225,7 +224,6 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable { CGRect(x: 0, y: 1.0 / 2.0, width: 1.0, height: 1.0 / 2.0) case .leftHalf: CGRect(x: 0, y: 0, width: 1.0 / 2.0, height: 1.0) - // Quarters case .topLeftQuarter: CGRect(x: 0, y: 0, width: 1.0 / 2.0, height: 1.0 / 2.0) @@ -235,7 +233,6 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable { CGRect(x: 1.0 / 2.0, y: 1.0 / 2.0, width: 1.0 / 2.0, height: 1.0 / 2.0) case .bottomLeftQuarter: CGRect(x: 0, y: 1.0 / 2.0, width: 1.0 / 2.0, height: 1.0 / 2.0) - // Thirds (Horizontal) case .rightThird: CGRect(x: 2.0 / 3.0, y: 0, width: 1.0 / 3.0, height: 1.0) @@ -247,7 +244,6 @@ enum WindowDirection: String, CaseIterable, Identifiable, Codable { CGRect(x: 0, y: 0, width: 1.0 / 3.0, height: 1.0) case .leftTwoThirds: CGRect(x: 0, y: 0, width: 2.0 / 3.0, height: 1.0) - // Thirds (Vertical) case .topThird: CGRect(x: 0, y: 0, width: 1.0, height: 1.0 / 3.0)