Rework theme API
This commit adds support for theming on macOS and also unifies the system theme handling across platforms.
This commit is contained in:
parent
4f06cfcf5b
commit
92fdf5ba85
20 changed files with 256 additions and 60 deletions
|
|
@ -138,14 +138,6 @@ pub trait WindowBuilderExtWayland {
|
|||
/// For details about application ID conventions, see the
|
||||
/// [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id)
|
||||
fn with_name(self, general: impl Into<String>, instance: impl Into<String>) -> Self;
|
||||
|
||||
/// Build window with certain decoration [`Theme`]
|
||||
///
|
||||
/// You can also use `WINIT_WAYLAND_CSD_THEME` env variable to set the theme.
|
||||
/// Possible values for env variable are: "dark" and light".
|
||||
///
|
||||
/// When unspecified a theme is automatically selected.
|
||||
fn with_wayland_csd_theme(self, theme: Theme) -> Self;
|
||||
}
|
||||
|
||||
impl WindowBuilderExtWayland for WindowBuilder {
|
||||
|
|
@ -154,12 +146,6 @@ impl WindowBuilderExtWayland for WindowBuilder {
|
|||
self.platform_specific.name = Some(ApplicationName::new(general.into(), instance.into()));
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_wayland_csd_theme(mut self, theme: Theme) -> Self {
|
||||
self.platform_specific.csd_theme = Some(theme);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `MonitorHandle` that are specific to Wayland.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue