Merge branch 'master' into feature/test-recorder

This commit is contained in:
Héctor Ramón Jiménez 2025-09-19 18:23:28 +02:00
commit e2df674aa5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
9 changed files with 26 additions and 25 deletions

View file

@ -1860,7 +1860,10 @@ where
row![
svg(LOGO.clone()).width(text_size * 1.3),
text("iced").size(text_size).font(Font::MONOSPACE)
text("iced")
.size(text_size)
.font(Font::MONOSPACE)
.shaping(text::Shaping::Advanced)
]
.spacing(text_size.0 / 3.0)
.align_y(Alignment::Center)

View file

@ -534,8 +534,7 @@ impl Focus {
self.is_window_focused
&& ((self.now - self.updated_at).as_millis()
/ Self::CURSOR_BLINK_INTERVAL_MILLIS)
% 2
== 0
.is_multiple_of(2)
}
}

View file

@ -512,8 +512,7 @@ where
let is_cursor_visible = !is_disabled
&& ((focus.now - focus.updated_at).as_millis()
/ CURSOR_BLINK_INTERVAL_MILLIS)
% 2
== 0;
.is_multiple_of(2);
let cursor = if is_cursor_visible {
Some((

View file

@ -201,23 +201,23 @@ where
shell: &mut Shell<'_, Message>,
viewport: &Rectangle,
) {
let state = tree.state.downcast_mut::<State>();
if let Event::Mouse(_) = event {
let state = tree.state.downcast_mut::<State>();
let was_idle = *state == State::Idle;
let previous_state = *state;
let was_idle = *state == State::Idle;
*state = cursor
.position_over(layout.bounds())
.map(|cursor_position| State::Hovered { cursor_position })
.unwrap_or_default();
*state = cursor
.position_over(layout.bounds())
.map(|cursor_position| State::Hovered { cursor_position })
.unwrap_or_default();
let is_idle = *state == State::Idle;
let is_idle = *state == State::Idle;
if was_idle != is_idle
|| (self.position == Position::FollowCursor
&& previous_state != *state)
{
shell.request_redraw();
if was_idle != is_idle {
shell.invalidate_layout();
shell.request_redraw();
} else if self.position == Position::FollowCursor {
shell.request_redraw();
}
}
self.content.as_widget_mut().update(