Use consistent import style in iced widget
This commit is contained in:
parent
2f25bb1e0f
commit
c576ea4157
1 changed files with 6 additions and 6 deletions
|
|
@ -1847,10 +1847,10 @@ where
|
||||||
From<container::StyleFn<'a, Theme>>,
|
From<container::StyleFn<'a, Theme>>,
|
||||||
<Theme as text::Catalog>::Class<'a>: From<text::StyleFn<'a, Theme>>,
|
<Theme as text::Catalog>::Class<'a>: From<text::StyleFn<'a, Theme>>,
|
||||||
{
|
{
|
||||||
use crate::core::{
|
use crate::core::border;
|
||||||
Alignment, Color, Font, Radians, border, border::radius, color,
|
use crate::core::color;
|
||||||
gradient::Linear,
|
use crate::core::gradient;
|
||||||
};
|
use crate::core::{Alignment, Color, Font, Radians};
|
||||||
|
|
||||||
let text_size = text_size.into();
|
let text_size = text_size.into();
|
||||||
|
|
||||||
|
|
@ -1865,12 +1865,12 @@ where
|
||||||
.padding(text_size * 0.15)
|
.padding(text_size * 0.15)
|
||||||
.style(move |_| container::Style {
|
.style(move |_| container::Style {
|
||||||
background: Some(
|
background: Some(
|
||||||
Linear::new(Radians::PI / 4.0)
|
gradient::Linear::new(Radians::PI / 4.0)
|
||||||
.add_stop(0.0, color!(0x0033ff))
|
.add_stop(0.0, color!(0x0033ff))
|
||||||
.add_stop(1.0, color!(0x1177ff))
|
.add_stop(1.0, color!(0x1177ff))
|
||||||
.into()
|
.into()
|
||||||
),
|
),
|
||||||
border: border::rounded(radius(text_size * 0.4)),
|
border: border::rounded(border::radius(text_size * 0.4)),
|
||||||
..container::Style::default()
|
..container::Style::default()
|
||||||
}),
|
}),
|
||||||
text("iced").size(text_size).font(Font::MONOSPACE)
|
text("iced").size(text_size).font(Font::MONOSPACE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue