mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 09:38:51 +00:00
v3.2.0
This commit is contained in:
@@ -35,32 +35,11 @@ struct GeneralSettingsTab: View {
|
||||
VStack {
|
||||
|
||||
HStack() {
|
||||
Text("Appearance").font(.title2)
|
||||
Text("Functionality").font(.title2)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: glass ? "cube.transparent" : "cube.transparent.fill")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.padding(.trailing)
|
||||
.foregroundStyle(.gray)
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("\(glass ? "Transparent material enabled" : "Transparent material disabled")")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
// InfoButton(text: "When transparent material is enabled, sticky section headers (User/System) in app list are disabled to keep from showing app name text overlayed under the section header text with no background to separate the two.", color: nil)
|
||||
Spacer()
|
||||
Toggle(isOn: $glass, label: {
|
||||
})
|
||||
.toggleStyle(.switch)
|
||||
}
|
||||
.padding(5)
|
||||
.padding(.leading)
|
||||
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: instantSearch ? "bolt" : "bolt.slash")
|
||||
@@ -110,146 +89,6 @@ struct GeneralSettingsTab: View {
|
||||
.padding(.leading)
|
||||
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: displayMode.colorScheme == .dark ? "moon.fill" : "sun.max.fill")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.padding(.trailing)
|
||||
.foregroundStyle(.gray)
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("Set application color mode")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
Spacer()
|
||||
Picker("", selection: $selectedTheme) {
|
||||
ForEach(themes, id: \.self) { theme in
|
||||
Text(theme)
|
||||
}
|
||||
}
|
||||
.pickerStyle(SegmentedPickerStyle())
|
||||
.frame(width: 200)
|
||||
.onChange(of: selectedTheme) { newTheme in
|
||||
switch newTheme {
|
||||
case "Auto":
|
||||
displayMode.colorScheme = nil
|
||||
if isDarkModeEnabled() {
|
||||
displayMode.colorScheme = .dark
|
||||
} else {
|
||||
displayMode.colorScheme = .light
|
||||
}
|
||||
case "Dark":
|
||||
displayMode.colorScheme = .dark
|
||||
case "Light":
|
||||
displayMode.colorScheme = .light
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(5)
|
||||
.padding(.leading)
|
||||
|
||||
// === Mini =================================================================================================
|
||||
|
||||
Divider()
|
||||
.padding()
|
||||
|
||||
|
||||
|
||||
HStack() {
|
||||
Text("Mini Configuration").font(.title2)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: mini ? "square.resize.up" : "square.resize.down")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.padding(.trailing)
|
||||
.foregroundStyle(.gray)
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("\(mini ? "Mini window mode selected" : "Full size window mode selected")")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
Spacer()
|
||||
Toggle(isOn: $mini, label: {
|
||||
})
|
||||
.toggleStyle(.switch)
|
||||
.onChange(of: mini) { newVal in
|
||||
if mini {
|
||||
appState.currentView = miniView ? .apps : .empty
|
||||
showPopover = false
|
||||
resizeWindowAuto(windowSettings: windowSettings)
|
||||
} else {
|
||||
resizeWindowAuto(windowSettings: windowSettings)
|
||||
if appState.appInfo.appName.isEmpty {
|
||||
appState.currentView = .empty
|
||||
} else {
|
||||
appState.currentView = .files
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(5)
|
||||
.padding(.leading)
|
||||
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: miniView ? "square.grid.3x3.square" : "plus.square.dashed")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.padding(.trailing)
|
||||
.foregroundStyle(.gray)
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("\(miniView ? "Show apps list on startup" : "Show drop target on startup")")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
|
||||
InfoButton(text: "In mini window mode, you can have Pearcleaner startup to the Apps List view or the Drop Target view.", color: nil, label: "")
|
||||
|
||||
Spacer()
|
||||
Toggle(isOn: $miniView, label: {
|
||||
})
|
||||
.toggleStyle(.switch)
|
||||
.onChange(of: miniView) { newVal in
|
||||
appState.currentView = newVal ? .apps : .empty
|
||||
}
|
||||
}
|
||||
.padding(5)
|
||||
.padding(.leading)
|
||||
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Image(systemName: popoverStay ? "pin" : "pin.slash")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 20, height: 20)
|
||||
.padding(.trailing)
|
||||
.foregroundStyle(.gray)
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text("\(popoverStay ? "Popover window will stay on top" : "Popover window will not stay on top")")
|
||||
.font(.callout)
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
|
||||
InfoButton(text: "In mini window mode, if you pin the Files popover on top, clicking away from the window will not dismiss it. Otherwise, it will dismiss by clicking anywhere outside the popover.", color: nil, label: "")
|
||||
|
||||
Spacer()
|
||||
Toggle(isOn: $popoverStay, label: {
|
||||
})
|
||||
.toggleStyle(.switch)
|
||||
}
|
||||
.padding(5)
|
||||
.padding(.leading)
|
||||
|
||||
|
||||
// === Perms ================================================================================================
|
||||
|
||||
|
||||
@@ -369,7 +208,7 @@ struct GeneralSettingsTab: View {
|
||||
|
||||
}
|
||||
.padding(20)
|
||||
.frame(width: 500, height: 690)
|
||||
.frame(width: 500, height: 420)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user