fmt [skip ci]

pull/406/head
Lucas Nogueira 2 years ago
parent d02b03fb3e
commit ac8dc0739c
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -1,5 +1,5 @@
--- ---
'window-js': 'minor:feat' "window-js": "minor:feat"
--- ---
Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`. Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`.

@ -1,6 +1,6 @@
--- ---
'window': 'minor:feat' "window": "minor:feat"
'window-js': 'minor:feat' "window-js": "minor:feat"
--- ---
Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods. Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods.

@ -1184,12 +1184,12 @@ class WindowManager extends WebviewWindowHandle {
label: this.label, label: this.label,
value: size value: size
? { ? {
type: size.type, type: size.type,
data: { data: {
width: size.width, width: size.width,
height: size.height, height: size.height,
}, },
} }
: null, : null,
}); });
} }
@ -1220,12 +1220,12 @@ class WindowManager extends WebviewWindowHandle {
label: this.label, label: this.label,
value: size value: size
? { ? {
type: size.type, type: size.type,
data: { data: {
width: size.width, width: size.width,
height: size.height, height: size.height,
}, },
} }
: null, : null,
}); });
} }
@ -2024,26 +2024,26 @@ interface WindowOptions {
/** /**
* Whether the window's native maximize button is enabled or not. Defaults to `true`. * Whether the window's native maximize button is enabled or not. Defaults to `true`.
*/ */
maximizable?: boolean maximizable?: boolean;
/** /**
* Whether the window's native minimize button is enabled or not. Defaults to `true`. * Whether the window's native minimize button is enabled or not. Defaults to `true`.
*/ */
minimizable?: boolean minimizable?: boolean;
/** /**
* Whether the window's native close button is enabled or not. Defaults to `true`. * Whether the window's native close button is enabled or not. Defaults to `true`.
*/ */
closable?: boolean closable?: boolean;
} }
function mapMonitor(m: Monitor | null): Monitor | null { function mapMonitor(m: Monitor | null): Monitor | null {
return m === null return m === null
? null ? null
: { : {
name: m.name, name: m.name,
scaleFactor: m.scaleFactor, scaleFactor: m.scaleFactor,
position: mapPhysicalPosition(m.position), position: mapPhysicalPosition(m.position),
size: mapPhysicalSize(m.size), size: mapPhysicalSize(m.size),
}; };
} }
function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition { function mapPhysicalPosition(m: PhysicalPosition): PhysicalPosition {

Loading…
Cancel
Save