Add X11-specific with_gtk_theme_variant option (#659)

This commit is contained in:
Tobias Umbach 2018-09-20 23:00:04 +02:00 committed by Francesca Plebani
parent 1edbca1775
commit bc03ffb317
4 changed files with 27 additions and 0 deletions

View file

@ -219,6 +219,8 @@ pub trait WindowBuilderExt {
fn with_override_redirect(self, override_redirect: bool) -> WindowBuilder;
/// Build window with `_NET_WM_WINDOW_TYPE` hint; defaults to `Normal`. Only relevant on X11.
fn with_x11_window_type(self, x11_window_type: XWindowType) -> WindowBuilder;
/// Build window with `_GTK_THEME_VARIANT` hint set to the specified value. Currently only relevant on X11.
fn with_gtk_theme_variant(self, variant: String) -> WindowBuilder;
/// Build window with resize increment hint. Only implemented on X11.
fn with_resize_increments(self, increments: LogicalSize) -> WindowBuilder;
/// Build window with base size hint. Only implemented on X11.
@ -269,6 +271,12 @@ impl WindowBuilderExt for WindowBuilder {
self.platform_specific.base_size = Some(base_size.into());
self
}
#[inline]
fn with_gtk_theme_variant(mut self, variant: String) -> WindowBuilder {
self.platform_specific.gtk_theme_variant = Some(variant);
self
}
}
/// Additional methods on `MonitorId` that are specific to Linux.