Skip to content

Commit dea0e25

Browse files
committed
feat: Move the mode selector into the settings pane
1 parent 97eb90e commit dea0e25

File tree

8 files changed

+26
-11
lines changed

8 files changed

+26
-11
lines changed

auto-clicker/Build Assets/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</dict>
3131
</array>
3232
<key>CFBundleVersion</key>
33-
<string>efcfa90</string>
33+
<string>97eb90e</string>
3434
<key>LSApplicationCategoryType</key>
3535
<string>public.app-category.utilities</string>
3636
<key>LSMinimumSystemVersion</key>

auto-clicker/Localisation/de.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"settings_appearance" = "Erscheinungsbild";
4747
"settings_notifications" = "Benachrichtigungen";
4848

49+
"settings_general_interval_mode_title" = "Klick-Intervall-Modus";
50+
"settings_general_interval_mode_help" = "Wähle zwischen statischen Intervallen (feste Zeit zwischen Klicks) oder Bereichsintervallen (zufällige Zeit zwischen Min-/Max-Werten).";
51+
4952
"settings_general_app_should_quit_on_close_title" = "Lebenszyklus";
5053
"settings_general_app_should_quit_on_close" = "App beim Schließen des Hauptfensters beenden";
5154
"settings_general_app_should_quit_on_close_help" = "Wenn das Hauptfenster der Anwendung geschlossen wird, beende die App, anstatt sie im Hintergrund laufen zu lassen (Standardverhalten von macOS).";

auto-clicker/Localisation/en-GB.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
"settings_appearance" = "Appearance";
5454
"settings_notifications" = "Notifications";
5555

56+
"settings_general_interval_mode_title" = "Click Interval Mode";
57+
"settings_general_interval_mode_help" = "Choose between static intervals (fixed time between clicks) or range intervals (random time between min/max values).";
58+
5659
"settings_general_app_should_quit_on_close_title" = "Lifecycle";
5760
"settings_general_app_should_quit_on_close" = "Quit app on main window close";
5861
"settings_general_app_should_quit_on_close_help" = "When the main window of the application is closed, instead of keeping the app running in the background (macOS default behaviour), quit the app.";

auto-clicker/Localisation/es-419.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"settings_appearance" = "Apariencia";
4747
"settings_notifications" = "Notificaciones";
4848

49+
"settings_general_interval_mode_title" = "Modo de Intervalo de Clics";
50+
"settings_general_interval_mode_help" = "Elige entre intervalos estáticos (tiempo fijo entre clics) o intervalos de rango (tiempo aleatorio entre valores mín/máx).";
51+
4952
"settings_general_app_should_quit_on_close_title" = "Ciclo de vida";
5053
"settings_general_app_should_quit_on_close" = "Salir de la app al cerrar la ventana principal";
5154
"settings_general_app_should_quit_on_close_help" = "Cuando se cierre la ventana principal de la aplicación, en vez de mantener la app en segundo plano (comportamiento predeterminado de macOS), sal de la app.";

auto-clicker/Services/WindowStateService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Cocoa
1010
import Defaults
1111

1212
struct WindowStateService {
13-
static let mainWindowMinWidth: CGFloat = 625
13+
static let mainWindowMinWidth: CGFloat = 600
1414
static let mainWindowMinHeight: CGFloat = 430
1515
static let mainWindowMaxDimensionMultiplier: CGFloat = 1.3
1616

auto-clicker/Views/Main/MainView.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@ struct MainView: View {
8181
ActionStageLine {
8282
Text("main_window_every", comment: "Main window 'Every'")
8383

84-
Picker("", selection: self.$formState.intervalMode) {
85-
Text("static").tag(IntervalMode.staticInterval)
86-
Text("range").tag(IntervalMode.rangeInterval)
87-
}
88-
.pickerStyle(SegmentedPickerStyle())
89-
.frame(width: 120)
90-
.disabled(self.hasStarted)
91-
9284
if self.formState.intervalMode == .staticInterval {
9385
DynamicWidthNumberField(placeholder: "",
9486
min: MIN_PRESS_INTERVAL,

auto-clicker/Views/Settings/SettingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct SettingsView: View {
2929
Label("settings_general", systemImage: "gear")
3030
}
3131
.onAppear {
32-
self.changeFrameHeight(600)
32+
self.changeFrameHeight(700)
3333
}
3434

3535
KeyboardShortcutsSettingsTabView()

auto-clicker/Views/Settings/Tabs/GeneralSettingsTabView.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@ import UserNotifications
1414
struct GeneralSettingsTabView: View {
1515
@Default(.menuBarShowIcon) private var menuBarShowIcon
1616
@Default(.appShouldQuitOnClose) private var appShouldQuitOnClose
17+
@Default(.autoClickerState) private var formState
1718

1819
var body: some View {
1920
SettingsTabView {
21+
SettingsTabItemView(
22+
title: "settings_general_interval_mode_title",
23+
help: "settings_general_interval_mode_help",
24+
divider: true
25+
) {
26+
Picker("", selection: self.$formState.intervalMode) {
27+
Text("static", comment: "Static interval mode").tag(IntervalMode.staticInterval)
28+
Text("range", comment: "Range interval mode").tag(IntervalMode.rangeInterval)
29+
}
30+
.pickerStyle(SegmentedPickerStyle())
31+
.frame(width: 120)
32+
}
33+
2034
SettingsTabItemView(
2135
title: "settings_general_app_should_quit_on_close_title",
2236
help: "settings_general_app_should_quit_on_close_help"

0 commit comments

Comments
 (0)