Enum winsafe::gui::StatusBarPart[][src]

pub enum StatusBarPart {
    Fixed(u32),
    Proportional(u8),
}
Expand description

Used when adding the parts in StatusBar::new.

Variants

Fixed(u32)

A part that has a fixed size, in pixels.

Will be adjusted to match current system DPI.

Tuple Fields of Fixed

0: u32
Proportional(u8)

A part that will resize when the parent window resizes, filling the space left by the fixed-size parts. Has the resizing proportion.

How proportion works:

  1. Suppose you have 3 parts, respectively with proportions of 1, 1 and 2.
  2. If available client area width is 400px, respective part widths will be 100, 100 and 200px.
  3. If parent is resized to have a client area of 600px, parts will then have 200, 200 and 400px.

If you’re uncertain, just give all resizable parts the proportion 1.

Tuple Fields of Proportional

0: u8

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.