Enum tauri_utils::TitleBarStyle
source · pub enum TitleBarStyle {
Visible,
Transparent,
Overlay,
}
Expand description
How the window title bar should be displayed.
Variants
Visible
A normal title bar.
Transparent
Makes the title bar transparent, so the window background color is shown instead.
Useful if you don’t need to have actual HTML under the title bar. This lets you avoid the caveats of using TitleBarStyle::Overlay
. Will be more useful when Tauri lets you set a custom window background color.
Overlay
Shows the title bar as a transparent overlay over the window’s content.
Keep in mind:
- The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don’t expect.
- You need to define a custom drag region to make your window draggable, however due to a limitation you can’t drag the window when it’s not in focus (https://github.com/tauri-apps/tauri/issues/4316).
- The color of the window title depends on the system theme.
Trait Implementations
sourceimpl Clone for TitleBarStyle
impl Clone for TitleBarStyle
sourcefn clone(&self) -> TitleBarStyle
fn clone(&self) -> TitleBarStyle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TitleBarStyle
impl Debug for TitleBarStyle
sourceimpl Default for TitleBarStyle
impl Default for TitleBarStyle
sourceimpl<'de> Deserialize<'de> for TitleBarStyle
impl<'de> Deserialize<'de> for TitleBarStyle
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for TitleBarStyle
impl Display for TitleBarStyle
sourceimpl PartialEq<TitleBarStyle> for TitleBarStyle
impl PartialEq<TitleBarStyle> for TitleBarStyle
sourcefn eq(&self, other: &TitleBarStyle) -> bool
fn eq(&self, other: &TitleBarStyle) -> bool
sourceimpl Serialize for TitleBarStyle
impl Serialize for TitleBarStyle
impl Eq for TitleBarStyle
impl StructuralEq for TitleBarStyle
impl StructuralPartialEq for TitleBarStyle
Auto Trait Implementations
impl RefUnwindSafe for TitleBarStyle
impl Send for TitleBarStyle
impl Sync for TitleBarStyle
impl Unpin for TitleBarStyle
impl UnwindSafe for TitleBarStyle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more