mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
If window is maximized, reset values to default
This commit is contained in:
@@ -19,6 +19,14 @@ data class WindowSettings(
|
||||
val maximized: Boolean? = null
|
||||
) {
|
||||
fun get(): WindowGet {
|
||||
if (maximized == true) {
|
||||
// Maximize messes with the other parameters so set them to default
|
||||
return WindowGet(
|
||||
IntOffset.Zero,
|
||||
IntSize(800, 600),
|
||||
true
|
||||
)
|
||||
}
|
||||
val offset = if (x != null && y != null) {
|
||||
IntOffset(x, y)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user