adapt to iced 0.8
* font size is now an f32 * Alignment::Fill was removed Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
This commit is contained in:
parent
e01b2b3ceb
commit
6fb0761911
|
@ -1049,7 +1049,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"iced_futures",
|
||||
|
@ -1062,7 +1062,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_core"
|
||||
version = "0.7.0"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"instant",
|
||||
|
@ -1071,7 +1071,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_futures"
|
||||
version = "0.5.1"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"log 0.4.17",
|
||||
|
@ -1081,7 +1081,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_graphics"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bytemuck",
|
||||
|
@ -1095,7 +1095,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_native"
|
||||
version = "0.8.0"
|
||||
version = "0.9.1"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"iced_futures",
|
||||
|
@ -1107,7 +1107,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_style"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"once_cell",
|
||||
|
@ -1116,7 +1116,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_wgpu"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"bytemuck",
|
||||
|
@ -1135,7 +1135,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "iced_winit"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"iced_futures",
|
||||
"iced_graphics",
|
||||
|
|
|
@ -163,7 +163,7 @@ impl Application for CalendarApp {
|
|||
"dicembre",
|
||||
];
|
||||
let mut content = Column::new()
|
||||
.align_items(Alignment::Fill)
|
||||
.align_items(Alignment::Center)
|
||||
.push(self.controls.view(MONTH_NAMES[self.month.month0() as usize], self.month.year()))
|
||||
;
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ impl<'a> CalendarYearView<'a> {
|
|||
});
|
||||
|
||||
// render events, if enough space
|
||||
let day_text_size = renderer.measure(content, font_size as u16, Default::default(), day_bounds.size());
|
||||
let day_text_size = renderer.measure(content, font_size, Default::default(), day_bounds.size());
|
||||
let ev_height = self.params.ev_height;
|
||||
if day_bounds.height - day_text_size.1 > ev_height {
|
||||
if let Some(ev_day) = self.events.is_any_in_day(current_day) {
|
||||
|
@ -621,7 +621,7 @@ impl<'a> CalendarYearView<'a> {
|
|||
fn compute_month_col_width(&self, renderer: &mut impl text::Renderer) -> f32 {
|
||||
let mut max_max_font_width = 0.0;
|
||||
for month_name in MONTH_NAMES {
|
||||
let month_width = renderer.measure_width(month_name, self.month_column_font_size as u16, Default::default());
|
||||
let month_width = renderer.measure_width(month_name, self.month_column_font_size, Default::default());
|
||||
if month_width > max_max_font_width {
|
||||
max_max_font_width = month_width;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue