Style Button
min-width in iced_web
This commit is contained in:
parent
d0f79d2779
commit
b2721661f5
@ -4,7 +4,7 @@
|
|||||||
//!
|
//!
|
||||||
//! [`Button`]: struct.Button.html
|
//! [`Button`]: struct.Button.html
|
||||||
//! [`State`]: struct.State.html
|
//! [`State`]: struct.State.html
|
||||||
use crate::{style, Background, Bus, Color, Element, Length, Style, Widget};
|
use crate::{style, Background, Bus, Element, Length, Style, Widget};
|
||||||
|
|
||||||
use dodrio::bumpalo;
|
use dodrio::bumpalo;
|
||||||
|
|
||||||
@ -136,13 +136,7 @@ where
|
|||||||
let background = match self.background {
|
let background = match self.background {
|
||||||
None => String::from("none"),
|
None => String::from("none"),
|
||||||
Some(background) => match background {
|
Some(background) => match background {
|
||||||
Background::Color(Color { r, g, b, a }) => format!(
|
Background::Color(color) => style::color(color),
|
||||||
"rgba({}, {}, {}, {})",
|
|
||||||
255.0 * r,
|
|
||||||
255.0 * g,
|
|
||||||
255.0 * b,
|
|
||||||
a
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,9 +149,10 @@ where
|
|||||||
"style",
|
"style",
|
||||||
bumpalo::format!(
|
bumpalo::format!(
|
||||||
in bump,
|
in bump,
|
||||||
"background: {}; border-radius: {}px",
|
"background: {}; border-radius: {}px; min-width: {}px",
|
||||||
background,
|
background,
|
||||||
self.border_radius
|
self.border_radius,
|
||||||
|
self.min_width
|
||||||
)
|
)
|
||||||
.into_bump_str(),
|
.into_bump_str(),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user