Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

Auto-fix formatting issues

GitHub Actionaec5e2718a55
diff --git a/bin/cli.ts b/bin/cli.ts
index 88860f6f..50cf4aad 100644
--- a/bin/cli.ts
+++ b/bin/cli.ts
@@ -188,10 +188,7 @@ program
.hideHelp(),
)
.addOption(
- new Option(
- '--zoom <number>',
- 'Initial page zoom level (50-200)',
- )
+ new Option('--zoom <number>', 'Initial page zoom level (50-200)')
.default(DEFAULT.zoom)
.argParser((value) => {
const zoom = parseInt(value);
@@ -203,19 +200,13 @@ program
.hideHelp(),
)
.addOption(
- new Option(
- '--min-width <number>',
- 'Minimum window width',
- )
+ new Option('--min-width <number>', 'Minimum window width')
.default(DEFAULT.minWidth)
.argParser(validateNumberInput)
.hideHelp(),
)
.addOption(
- new Option(
- '--min-height <number>',
- 'Minimum window height',
- )
+ new Option('--min-height <number>', 'Minimum window height')
.default(DEFAULT.minHeight)
.argParser(validateNumberInput)
.hideHelp(),
diff --git a/src-tauri/src/app/window.rs b/src-tauri/src/app/window.rs
index 42d4d97f..5333ad92 100644
--- a/src-tauri/src/app/window.rs
+++ b/src-tauri/src/app/window.rs
@@ -65,8 +65,16 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
.incognito(window_config.incognito);
if window_config.min_width > 0.0 || window_config.min_height > 0.0 {
- let min_w = if window_config.min_width > 0.0 { window_config.min_width } else { window_config.width };
- let min_h = if window_config.min_height > 0.0 { window_config.min_height } else { window_config.height };
+ let min_w = if window_config.min_width > 0.0 {
+ window_config.min_width
+ } else {
+ window_config.width
+ };
+ let min_h = if window_config.min_height > 0.0 {
+ window_config.min_height
+ } else {
+ window_config.height
+ };
window_builder = window_builder.min_inner_size(min_w, min_h);
}