egui_modal

Struct ModalStyle

source
pub struct ModalStyle {
Show 17 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 default_height: 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

§default_height: Option<f32>

The default height of the modal

§body_alignment: Align

The alignment of text inside the body

Trait Implementations§

source§

impl Clone for ModalStyle

source§

fn clone(&self) -> ModalStyle

Returns a copy of the value. Read more
1.6.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ModalStyle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ModalStyle

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,