summaryrefslogtreecommitdiffstats
path: root/src/window/settings/macos.rs
diff options
context:
space:
mode:
authorLibravatar Casper Storm <casper.storm@lich.io>2023-02-23 14:33:53 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-14 11:31:15 +0100
commited7b61380473c7c88c25b5d4d17112b844a9364d (patch)
treeb6c0c11ee9e476a53c8aa0abede1ede7197ca559 /src/window/settings/macos.rs
parentde4ae51e3cc30dc2ee1db1686b98a709f9552f80 (diff)
downloadiced-ed7b61380473c7c88c25b5d4d17112b844a9364d.tar.gz
iced-ed7b61380473c7c88c25b5d4d17112b844a9364d.tar.bz2
iced-ed7b61380473c7c88c25b5d4d17112b844a9364d.zip
Added macOS platform specific options
Diffstat (limited to 'src/window/settings/macos.rs')
-rw-r--r--src/window/settings/macos.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/window/settings/macos.rs b/src/window/settings/macos.rs
new file mode 100644
index 00000000..c08020cf
--- /dev/null
+++ b/src/window/settings/macos.rs
@@ -0,0 +1,20 @@
+/// The platform specific window settings of an application.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
+pub struct PlatformSpecific {
+ /// Hides the window title.
+ pub title_hidden: bool,
+ /// Makes the titlebar transparent and allows the content to appear behind it.
+ pub titlebar_transparent: bool,
+ /// Makes the window content appear behind the titlebar.
+ pub fullsize_content_view: bool,
+}
+
+impl From<PlatformSpecific> for iced_winit::settings::PlatformSpecific {
+ fn from(platform_specific: PlatformSpecific) -> Self {
+ Self {
+ title_hidden: platform_specific.title_hidden,
+ titlebar_transparent: platform_specific.titlebar_transparent,
+ fullsize_content_view: platform_specific.fullsize_content_view,
+ }
+ }
+}