pub struct CsdConfig {
pub enabled: bool,
pub titlebar_height: i16,
pub resize_border_px: i16,
pub controls_inset_right: i16,
pub double_click_maximize: bool,
}Expand description
客户端自绘无边框标题栏(Client-Side Decorations / CSD)配置。
Fields§
§enabled: bool是否关闭 OS 原生标题栏并启用 CSD 自定义标题栏。
titlebar_height: i16自定义标题栏高度(逻辑像素,默认 36)。
resize_border_px: i16窗口四边可拖拽缩放的边缘热区宽度(逻辑像素,默认 6)。
controls_inset_right: i16显式排除拖拽的右上角窗口按钮区域宽度(最小化/最大化/关闭按钮,默认 138)。
double_click_maximize: bool双击标题栏空白处是否切换最大化。
Implementations§
Trait Implementations§
impl Copy for CsdConfig
impl Eq for CsdConfig
impl StructuralPartialEq for CsdConfig
Auto Trait Implementations§
impl Forget for CsdConfig
impl Freeze for CsdConfig
impl Move for CsdConfig
impl RefUnwindSafe for CsdConfig
impl Send for CsdConfig
impl Sync for CsdConfig
impl Unpin for CsdConfig
impl UnsafeUnpin for CsdConfig
impl UnwindSafe for CsdConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。