Struct egui_modal::ModalStyle

source ·
pub struct ModalStyle {
Show 16 fields pub body_margin: f32, pub frame_margin: f32, pub icon_margin: f32, pub icon_size: f32, pub overlay_color: Color32, pub caution_button_fill: Color32, pub suggested_button_fill: Color32, pub caution_button_text_color: Color32, pub suggested_button_text_color: Color32, pub dialog_ok_text: String, pub info_icon_color: Color32, pub warning_icon_color: Color32, pub success_icon_color: Color32, pub error_icon_color: Color32, pub default_width: Option<f32>, pub body_alignment: Align,
}
Expand description

Contains styling parameters for the modal, like body margin and button colors.

Fields§

§body_margin: f32

The margin around the modal body. Only applies if using [.body()]

§frame_margin: f32

The margin around the container of the icon and body. Only applies if using [.frame()]

§icon_margin: f32

The margin around the container of the icon. Only applies if using [.icon()].

§icon_size: f32

The size of any icons used in the modal

§overlay_color: Color32

The color of the overlay that dims the background

§caution_button_fill: Color32

The fill color for the caution button style

§suggested_button_fill: Color32

The fill color for the suggested button style

§caution_button_text_color: Color32

The text color for the caution button style

§suggested_button_text_color: Color32

The text color for the suggested button style

§dialog_ok_text: String

The text of the acknowledgement button for dialogs

§info_icon_color: Color32

The color of the info icon

§warning_icon_color: Color32

The color of the warning icon

§success_icon_color: Color32

The color of the success icon

§error_icon_color: Color32

The color of the error icon

§default_width: Option<f32>

The default width of the modal

§body_alignment: Align

The default height of the modal The alignment of text inside the body

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.