From 4d9221debb092f457d86515dd0aa4ddb19fb6284 Mon Sep 17 00:00:00 2001 From: Ivan Zorin <6960799+zorikon@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:46:02 +0400 Subject: [PATCH] Remove extension --- Whisky.xcodeproj/project.pbxproj | 4 --- Whisky/Extensions/View+Extension.swift | 25 ------------------- Whisky/Views/Bottle/BottleCreationView.swift | 2 +- .../Views/Bottle/Pins/PinCreationView.swift | 2 +- Whisky/Views/Common/RenameView.swift | 2 +- Whisky/Views/FileOpenView.swift | 2 +- Whisky/Views/Settings/SettingsView.swift | 2 +- 7 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 Whisky/Extensions/View+Extension.swift diff --git a/Whisky.xcodeproj/project.pbxproj b/Whisky.xcodeproj/project.pbxproj index 6ad50f2b..e2722564 100644 --- a/Whisky.xcodeproj/project.pbxproj +++ b/Whisky.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 6365C4C32B1AA8CD00AAE1FD /* BottleListEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6365C4C22B1AA8CD00AAE1FD /* BottleListEntry.swift */; }; 63FFDE862ADF0C7700178665 /* BottomBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FFDE852ADF0C7700178665 /* BottomBar.swift */; }; 6763D8F62BC6314100651D27 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6763D8F52BC6314100651D27 /* Constants.swift */; }; - 6763D8F82BC632A800651D27 /* View+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6763D8F72BC632A800651D27 /* View+Extension.swift */; }; 67D278512BC5907E006F9A1E /* ActionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67D278502BC5907E006F9A1E /* ActionView.swift */; }; 6E064B1229DD32A200D9A2D2 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 6E064B1129DD32A200D9A2D2 /* Sparkle */; }; 6E064B1429DD331F00D9A2D2 /* SparkleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E064B1329DD331F00D9A2D2 /* SparkleView.swift */; }; @@ -116,7 +115,6 @@ 6365C4C22B1AA8CD00AAE1FD /* BottleListEntry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottleListEntry.swift; sourceTree = ""; }; 63FFDE852ADF0C7700178665 /* BottomBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomBar.swift; sourceTree = ""; }; 6763D8F52BC6314100651D27 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 6763D8F72BC632A800651D27 /* View+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extension.swift"; sourceTree = ""; }; 67D278502BC5907E006F9A1E /* ActionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionView.swift; sourceTree = ""; }; 6E064B1329DD331F00D9A2D2 /* SparkleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SparkleView.swift; sourceTree = ""; }; 6E17B6452AF3FDC100831173 /* PinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinView.swift; sourceTree = ""; }; @@ -206,7 +204,6 @@ children = ( 6E40498229CCA91B006E3F1B /* Bottle+Extensions.swift */, 6365C4C02B1AA69D00AAE1FD /* Animation+Extensions.swift */, - 6763D8F72BC632A800651D27 /* View+Extension.swift */, ); path = Extensions; sourceTree = ""; @@ -600,7 +597,6 @@ 6E355E5829D78249002D83BE /* ConfigView.swift in Sources */, 63FFDE862ADF0C7700178665 /* BottomBar.swift in Sources */, 6E6C0CF62A419A8300356232 /* WhiskyWineDownloadView.swift in Sources */, - 6763D8F82BC632A800651D27 /* View+Extension.swift in Sources */, 6365C4C32B1AA8CD00AAE1FD /* BottleListEntry.swift in Sources */, 6E50D98529CDF25B008C39F6 /* BottleCreationView.swift in Sources */, 6E182FCA2B0BF64E00AADE81 /* WinetricksView.swift in Sources */, diff --git a/Whisky/Extensions/View+Extension.swift b/Whisky/Extensions/View+Extension.swift deleted file mode 100644 index bba94e06..00000000 --- a/Whisky/Extensions/View+Extension.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// View+Extension.swift -// Whisky -// -// This file is part of Whisky. -// -// Whisky is free software: you can redistribute it and/or modify it under the terms -// of the GNU General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Whisky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along with Whisky. -// If not, see https://www.gnu.org/licenses/. -// - -import SwiftUI - -extension View { - func fixedVerticalSize() -> some View { - self.fixedSize(horizontal: false, vertical: true) - } -} diff --git a/Whisky/Views/Bottle/BottleCreationView.swift b/Whisky/Views/Bottle/BottleCreationView.swift index ea26a0f3..d2f003ef 100644 --- a/Whisky/Views/Bottle/BottleCreationView.swift +++ b/Whisky/Views/Bottle/BottleCreationView.swift @@ -83,7 +83,7 @@ struct BottleCreationView: View { submit() } } - .fixedVerticalSize() + .fixedSize(horizontal: false, vertical: true) .frame(width: ViewWidth.small) } diff --git a/Whisky/Views/Bottle/Pins/PinCreationView.swift b/Whisky/Views/Bottle/Pins/PinCreationView.swift index 736da241..2bd4c8ac 100644 --- a/Whisky/Views/Bottle/Pins/PinCreationView.swift +++ b/Whisky/Views/Bottle/Pins/PinCreationView.swift @@ -93,7 +93,7 @@ struct PinCreationView: View { submit() } } - .fixedVerticalSize() + .fixedSize(horizontal: false, vertical: true) .frame(minWidth: ViewWidth.small) } diff --git a/Whisky/Views/Common/RenameView.swift b/Whisky/Views/Common/RenameView.swift index 4a1f3160..519db580 100644 --- a/Whisky/Views/Common/RenameView.swift +++ b/Whisky/Views/Common/RenameView.swift @@ -57,7 +57,7 @@ struct RenameView: View { submit() } } - .fixedVerticalSize() + .fixedSize(horizontal: false, vertical: true) .frame(minWidth: ViewWidth.small) } diff --git a/Whisky/Views/FileOpenView.swift b/Whisky/Views/FileOpenView.swift index bc791a77..a7ca4b0e 100644 --- a/Whisky/Views/FileOpenView.swift +++ b/Whisky/Views/FileOpenView.swift @@ -55,7 +55,7 @@ struct FileOpenView: View { } } } - .fixedVerticalSize() + .fixedSize(horizontal: false, vertical: true) .frame(width: ViewWidth.small) .onAppear { // Makes sure there are more than 0 bottles. diff --git a/Whisky/Views/Settings/SettingsView.swift b/Whisky/Views/Settings/SettingsView.swift index 1e6abbe0..70e68702 100644 --- a/Whisky/Views/Settings/SettingsView.swift +++ b/Whisky/Views/Settings/SettingsView.swift @@ -53,7 +53,7 @@ struct SettingsView: View { } } .formStyle(.grouped) - .fixedVerticalSize() + .fixedSize(horizontal: false, vertical: true) .frame(width: ViewWidth.medium) } }