On Windows, add option to customize window class name (#2978)
This commit is contained in:
parent
e33d2bee6c
commit
75173118b0
5 changed files with 16 additions and 6 deletions
|
|
@ -223,6 +223,9 @@ pub trait WindowBuilderExtWindows {
|
|||
/// Whether show or hide the window icon in the taskbar.
|
||||
fn with_skip_taskbar(self, skip: bool) -> WindowBuilder;
|
||||
|
||||
/// Customize the window class name.
|
||||
fn with_class_name<S: Into<String>>(self, class_name: S) -> WindowBuilder;
|
||||
|
||||
/// Shows or hides the background drop shadow for undecorated windows.
|
||||
///
|
||||
/// The shadow is hidden by default.
|
||||
|
|
@ -267,6 +270,12 @@ impl WindowBuilderExtWindows for WindowBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_class_name<S: Into<String>>(mut self, class_name: S) -> WindowBuilder {
|
||||
self.platform_specific.class_name = class_name.into();
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_undecorated_shadow(mut self, shadow: bool) -> WindowBuilder {
|
||||
self.platform_specific.decoration_shadow = shadow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue