Skip to content

Commit

Permalink
Remove bigButton style
Browse files Browse the repository at this point in the history
Remove the custom bigButton style in favor of using the .controlSize(.large) modifier
  • Loading branch information
milanvarady committed Jan 1, 2025
1 parent 00cb819 commit 16463a6
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 66 deletions.
12 changes: 0 additions & 12 deletions Applite.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
418989B22A35D651004AC23B /* isBrewPathValid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418989B12A35D651004AC23B /* isBrewPathValid.swift */; };
418989B42A35D67C004AC23B /* isCommandLineToolsInstalled.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418989B32A35D67C004AC23B /* isCommandLineToolsInstalled.swift */; };
4189CE392937CD41009C836D /* Shimmer in Frameworks */ = {isa = PBXBuildFile; productRef = 4189CE382937CD41009C836D /* Shimmer */; };
4189CE41293C980E009C836D /* BigButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4189CE40293C980E009C836D /* BigButtonStyle.swift */; };
418E9EF42AACD9C000046A58 /* CircularProgress in Frameworks */ = {isa = PBXBuildFile; productRef = 418E9EF32AACD9C000046A58 /* CircularProgress */; };
418F331C28EB3D540023D76F /* AppGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418F331B28EB3D540023D76F /* AppGridView.swift */; };
418F332428EC8BA10023D76F /* Cask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418F332328EC8BA10023D76F /* Cask.swift */; };
Expand Down Expand Up @@ -144,7 +143,6 @@
418989AE2A33B65A004AC23B /* SmallProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallProgressView.swift; sourceTree = "<group>"; };
418989B12A35D651004AC23B /* isBrewPathValid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = isBrewPathValid.swift; sourceTree = "<group>"; };
418989B32A35D67C004AC23B /* isCommandLineToolsInstalled.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = isCommandLineToolsInstalled.swift; sourceTree = "<group>"; };
4189CE40293C980E009C836D /* BigButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BigButtonStyle.swift; sourceTree = "<group>"; };
418F331B28EB3D540023D76F /* AppGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppGridView.swift; sourceTree = "<group>"; };
418F332328EC8BA10023D76F /* Cask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cask.swift; sourceTree = "<group>"; };
418F332528EC921D0023D76F /* CaskData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaskData.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -280,14 +278,6 @@
path = "Brew Installation";
sourceTree = "<group>";
};
4126354C2A79195200155034 /* Styles */ = {
isa = PBXGroup;
children = (
4189CE40293C980E009C836D /* BigButtonStyle.swift */,
);
path = Styles;
sourceTree = "<group>";
};
413E60B52BBAE58B00978F6A /* Network Proxy */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -321,7 +311,6 @@
414074F428DF53E80073EB22 /* AppliteApp.swift */,
414074F828DF53EB0073EB22 /* Assets.xcassets */,
4140750328DF5ED00073EB22 /* Views */,
4126354C2A79195200155034 /* Styles */,
418F332228EC8B120023D76F /* Model */,
4191393129269FD600F1D75D /* Utilities */,
412635402A77F99F00155034 /* Extensions */,
Expand Down Expand Up @@ -707,7 +696,6 @@
414074F728DF53E80073EB22 /* ContentView.swift in Sources */,
419256392D1DF35C00D9EF10 /* SettingsView+Uninstaller.swift in Sources */,
419256472D1E0B0900D9EF10 /* BrewPathSelectorView+GetPathDescription.swift in Sources */,
4189CE41293C980E009C836D /* BigButtonStyle.swift in Sources */,
41DF006429EAA094004EB7AE /* SendNotification.swift in Sources */,
419256622D1E15EA00D9EF10 /* UpdateView+UpdateUnavailable.swift in Sources */,
41857B752912D94A004A1894 /* CategoryView.swift in Sources */,
Expand Down
40 changes: 0 additions & 40 deletions Applite/Styles/BigButtonStyle.swift

This file was deleted.

3 changes: 1 addition & 2 deletions Applite/Views/Content View/ContentView+DetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ extension ContentView {
} label: {
Label("Retry load", systemImage: "arrow.clockwise.circle")
}
.bigButton()
.disabled(false)
.controlSize(.large)
}
.frame(maxWidth: 600)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extension DownloadView {
} label: {
Label("Turn off few downloads filter", systemImage: "slider.horizontal.2.square.on.square")
}
.bigButton()
.controlSize(.large)
.help("Apps with few downloads are hidden, consider turning off this filter")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ extension UpdateView {
Text("Update All")
}
}
.bigButton(backgroundColor: .accentColor)
.buttonStyle(.borderedProminent)
.controlSize(.large)
.padding(.vertical)
.disabled(isUpdatingAll)
}
Expand Down
4 changes: 3 additions & 1 deletion Applite/Views/Settings/SettingsView+Uninstaller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ extension SettingsView {
} label: {
Label("Uninstall", systemImage: "trash.fill")
}
.bigButton(foregroundColor: .white, backgroundColor: .red)
.buttonStyle(.borderedProminent)
.tint(.red)
.controlSize(.large)

Text("Uninstall \(Bundle.main.appName), related files and cache.")
}
Expand Down
3 changes: 2 additions & 1 deletion Applite/Views/Setup/SetupView+AllSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ extension SetupView {
Button("Start Using \(Bundle.main.appName)") {
setupComplete = true
}
.bigButton(backgroundColor: .accentColor)
.buttonStyle(.borderedProminent)
.controlSize(.large)
}
}
}
2 changes: 1 addition & 1 deletion Applite/Views/Setup/SetupView+BrewInstall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension SetupView {
} label: {
Label("Retry Install", systemImage: "arrow.clockwise.circle")
}
.bigButton(backgroundColor: .secondary)
.controlSize(.large)
}
}
.frame(width: 440)
Expand Down
5 changes: 3 additions & 2 deletions Applite/Views/Setup/SetupView+BrewTypeSelection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ extension SetupView {
page = .brewPathSelection
BrewPaths.selectedBrewOption = .defaultAppleSilicon
}
.bigButton()
.controlSize(.large)

Button("No (I don't know what it is)") {
page = .brewInstall
BrewPaths.selectedBrewOption = .appPath
}
.bigButton(backgroundColor: .accentColor)
.buttonStyle(.borderedProminent)
.controlSize(.large)
}

Spacer()
Expand Down
5 changes: 3 additions & 2 deletions Applite/Views/Setup/SetupView+PageControllerButtons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension SetupView {
page = pageBefore
}
}
.bigButton(backgroundColor: Color(red: 0.7, green: 0.7, blue: 0.7))
.controlSize(.large)
}

Button("Continue") {
Expand All @@ -49,7 +49,8 @@ extension SetupView {
}
}
.disabled(!canContinue)
.bigButton(backgroundColor: canContinue ? .accentColor : .gray)
.buttonStyle(.borderedProminent)
.controlSize(.large)
}
.padding(.trailing)
.padding(.bottom, 8)
Expand Down
8 changes: 5 additions & 3 deletions Applite/Views/UninstallSelfView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ struct UninstallSelfView: View {
Divider()
.padding(.vertical)

Button {
Button(role: .destructive) {
showConfirmation = true
} label: {
Label("Uninstall \(Bundle.main.appName)", systemImage: "trash.fill")
}
.bigButton(foregroundColor: .white, backgroundColor: .red)

.buttonStyle(.borderedProminent)
.tint(.red)
.controlSize(.large)

Spacer()
}
.frame(width: 400, height: 250)
Expand Down

0 comments on commit 16463a6

Please sign in to comment.