Rename "keep" close confirmation to "cancel"
This commit is contained in:
parent
571ed60954
commit
5b9047ea85
@ -92,8 +92,8 @@ public struct Window: AdwaitaSceneElement {
|
|||||||
|
|
||||||
/// Close the window.
|
/// Close the window.
|
||||||
case close
|
case close
|
||||||
/// Keep the window.
|
/// Cancel the closing process and keep the window.
|
||||||
case keep
|
case cancel
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ public struct Window: AdwaitaSceneElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let onClose {
|
if let onClose {
|
||||||
storage.fields["on-close"] = { onClose() == .keep } as (() -> Bool)
|
storage.fields["on-close"] = { onClose() == .cancel } as (() -> Bool)
|
||||||
}
|
}
|
||||||
storage.previousState = self
|
storage.previousState = self
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ struct Demo: App {
|
|||||||
window
|
window
|
||||||
.size(width: $width, height: $height)
|
.size(width: $width, height: $height)
|
||||||
.maximized($maximized)
|
.maximized($maximized)
|
||||||
.onClose { closeAlert = !destroy; return destroy ? .close : .keep }
|
.onClose { closeAlert = !destroy; return destroy ? .close : .cancel }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user