From 1f0875051862d9c6d80bb0530d93ea99168011e7 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Tue, 16 Jul 2024 21:37:35 +0200 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=9A=A7=20remove=20scrollable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/mod.rs | 1 + client/src/main.rs | 61 ++++++------------------------------- 2 files changed, 10 insertions(+), 52 deletions(-) diff --git a/client/src/component/mod.rs b/client/src/component/mod.rs index 783dc91..03881ce 100644 --- a/client/src/component/mod.rs +++ b/client/src/component/mod.rs @@ -1,3 +1,4 @@ pub mod entry; pub mod plugin; +pub mod plugin_header; pub mod query_input; diff --git a/client/src/main.rs b/client/src/main.rs index b480263..a9680e9 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -31,7 +31,6 @@ struct Centerpiece { settings: settings::Settings, } -pub const SCROLLABLE_ID: &str = "scrollable"; pub const APP_ID: &str = "centerpiece"; impl Application for Centerpiece { @@ -255,7 +254,8 @@ impl Application for Centerpiece { iced::widget::container(iced::widget::column![ component::query_input::view(&self.query, !entries.is_empty()), - iced::widget::scrollable(iced::widget::column( + iced::widget::column( + self.plugins .iter() .filter(|plugin| !plugin.entries.is_empty()) @@ -266,11 +266,7 @@ impl Application for Centerpiece { self.active_entry_id() )) .collect() - )) - .id(iced::widget::scrollable::Id::new(SCROLLABLE_ID)) - .style(iced::theme::Scrollable::Custom(Box::new( - ScrollableStyle {}, - ))), + ) ]) .style(iced::theme::Container::Custom(Box::new( ApplicationWrapperStyle {}, @@ -422,10 +418,12 @@ impl Centerpiece { let plugin_header_height = 3.57 * crate::REM; let offset = (plugin_index * plugin_header_height) + (entry_index * entry_height); - iced::widget::scrollable::scroll_to( - iced::widget::scrollable::Id::new(SCROLLABLE_ID), - iced::widget::scrollable::AbsoluteOffset { x: 0.0, y: offset }, - ) + // TODO: reimplement this + //iced::widget::scrollable::scroll_to( + // iced::widget::scrollable::Id::new(SCROLLABLE_ID), + // iced::widget::scrollable::AbsoluteOffset { x: 0.0, y: offset }, + //) + } fn select_next_plugin(&mut self) -> iced::Command { @@ -555,44 +553,3 @@ impl iced::widget::container::StyleSheet for ApplicationWrapperStyle { } } } - -struct ScrollableStyle {} -impl iced::widget::scrollable::StyleSheet for ScrollableStyle { - type Style = iced::Theme; - - fn active(&self, _style: &Self::Style) -> iced::widget::scrollable::Scrollbar { - let color_settings = crate::settings::Settings::new(); - iced::widget::scrollable::Scrollbar { - background: None, - border_radius: iced::BorderRadius::from(0.), - border_width: 0., - border_color: iced::Color::TRANSPARENT, - scroller: iced::widget::scrollable::Scroller { - color: settings::hexcolor(&color_settings.color.surface), - border_radius: iced::BorderRadius::from(0.25 * REM), - border_width: 4., - border_color: settings::hexcolor(&color_settings.color.background), - }, - } - } - - fn hovered( - &self, - _style: &Self::Style, - _is_mouse_over_scrollbar: bool, - ) -> iced::widget::scrollable::Scrollbar { - let color_settings = crate::settings::Settings::new(); - iced::widget::scrollable::Scrollbar { - background: None, - border_radius: iced::BorderRadius::from(0.), - border_width: 0., - border_color: iced::Color::TRANSPARENT, - scroller: iced::widget::scrollable::Scroller { - color: settings::hexcolor(&color_settings.color.surface), - border_radius: iced::BorderRadius::from(0.25 * REM), - border_width: 4., - border_color: settings::hexcolor(&color_settings.color.background), - }, - } - } -} From 6ff360c504b92cc3252f05c1f45f06f559c3dd35 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Tue, 23 Jul 2024 22:18:03 +0200 Subject: [PATCH 2/7] =?UTF-8?q?=E2=9C=A8=20add=20paginated=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/entry.rs | 21 +++++---- client/src/component/mod.rs | 1 - client/src/component/plugin.rs | 39 ---------------- client/src/component/plugin_header.rs | 17 +++++++ client/src/main.rs | 65 ++++++++++++++++++++------- 5 files changed, 78 insertions(+), 65 deletions(-) delete mode 100644 client/src/component/plugin.rs create mode 100644 client/src/component/plugin_header.rs diff --git a/client/src/component/entry.rs b/client/src/component/entry.rs index 456e05f..85ed4de 100644 --- a/client/src/component/entry.rs +++ b/client/src/component/entry.rs @@ -1,15 +1,18 @@ pub fn view(entry: &crate::model::Entry, active: bool) -> iced::Element<'static, crate::Message> { return iced::widget::container( - iced::widget::row![ - iced::widget::text(clipped_title(entry.title.clone())) - .size(1. * crate::REM) - .width(iced::Length::Fill) - .shaping(iced::widget::text::Shaping::Advanced), - iced::widget::text(if active { &entry.action } else { "" }).size(1. * crate::REM) - ] - .padding(0.5 * crate::REM), + iced::widget::container( + iced::widget::row![ + iced::widget::text(clipped_title(entry.title.clone())) + .size(1. * crate::REM) + .width(iced::Length::Fill) + .shaping(iced::widget::text::Shaping::Advanced), + iced::widget::text(if active { &entry.action } else { "" }).size(1. * crate::REM) + ] + .padding(0.5 * crate::REM), + ) + .style(style(active)), ) - .style(style(active)) + .padding(iced::Padding::from([0., 0.75 * crate::REM])) .into(); } diff --git a/client/src/component/mod.rs b/client/src/component/mod.rs index 03881ce..ad0a682 100644 --- a/client/src/component/mod.rs +++ b/client/src/component/mod.rs @@ -1,4 +1,3 @@ pub mod entry; -pub mod plugin; pub mod plugin_header; pub mod query_input; diff --git a/client/src/component/plugin.rs b/client/src/component/plugin.rs deleted file mode 100644 index 0cb58c8..0000000 --- a/client/src/component/plugin.rs +++ /dev/null @@ -1,39 +0,0 @@ -pub fn view( - plugin: &crate::model::Plugin, - add_horizontal_rule: bool, - active_entry_id: Option<&String>, -) -> iced::Element<'static, crate::Message> { - let mut view = iced::widget::column![]; - - if add_horizontal_rule { - view = view.push(iced::widget::horizontal_rule(1)); - } - - view = view.push( - iced::widget::column![ - iced::widget::row![iced::widget::text(&plugin.title) - .font(iced::Font { - family: iced::font::Family::Name("FiraCode Nerd Font"), - weight: iced::font::Weight::Light, - stretch: iced::font::Stretch::Normal, - monospaced: true, - }) - .size(0.75 * crate::REM)] - .padding(0.5 * crate::REM), - iced::widget::column( - plugin - .entries - .iter() - .map(|entry| { - let is_active = - active_entry_id.is_some() && active_entry_id.unwrap() == &entry.id; - crate::component::entry::view(entry, is_active) - }) - .collect() - ) - ] - .padding(0.75 * crate::REM), - ); - - view.into() -} diff --git a/client/src/component/plugin_header.rs b/client/src/component/plugin_header.rs new file mode 100644 index 0000000..3164f27 --- /dev/null +++ b/client/src/component/plugin_header.rs @@ -0,0 +1,17 @@ +pub fn view(plugin: &crate::model::Plugin) -> iced::Element<'static, crate::Message> { + iced::widget::row![iced::widget::text(&plugin.title) + .font(iced::Font { + family: iced::font::Family::Name("FiraCode Nerd Font"), + weight: iced::font::Weight::Light, + stretch: iced::font::Stretch::Normal, + monospaced: true, + }) + .size(0.75 * crate::REM)] + .padding(iced::Padding::from([ + 0.8 * crate::REM, + 1.25 * crate::REM, + 0.5 * crate::REM, + 1.25 * crate::REM, + ])) + .into() +} diff --git a/client/src/main.rs b/client/src/main.rs index a9680e9..66a76d0 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -252,21 +252,54 @@ impl Application for Centerpiece { fn view(&self) -> iced::Element { let entries = self.entries(); + let mut lines_added = 0; + let mut entries_added = 0; + let mut lines = iced::widget::column![]; + while lines_added < 10 && lines_added < (entries.len() - self.active_entry_index) { + let entry_index_to_draw = self.active_entry_index + entries_added; + let mut last_plugin_start_index = 0; + for plugin in self.plugins.iter() { + if last_plugin_start_index == entry_index_to_draw { + if lines_added > 0 { + lines = lines.push( + iced::widget::column![iced::widget::horizontal_rule(1)].padding( + iced::Padding::from([1. * crate::REM, 0., 0.5 * crate::REM, 0.]), + ), + ); + } + + lines = lines.push(component::plugin_header::view(&plugin)); + lines_added += 1; + } + + last_plugin_start_index += plugin.entries.len(); + } + + if lines_added == 0 && entries_added == 0 { + lines = lines.push(component::entry::view( + entries[entry_index_to_draw - 1], + false, + )); + + lines_added += 1; + } + + if lines_added >= 10 { + break; + } + + lines = lines.push(component::entry::view( + entries[entry_index_to_draw], + entry_index_to_draw == self.active_entry_index, + )); + + lines_added += 1; + entries_added += 1; + } + iced::widget::container(iced::widget::column![ component::query_input::view(&self.query, !entries.is_empty()), - iced::widget::column( - - self.plugins - .iter() - .filter(|plugin| !plugin.entries.is_empty()) - .enumerate() - .map(|(index, plugin)| component::plugin::view( - plugin, - index != 0, - self.active_entry_id() - )) - .collect() - ) + lines ]) .style(iced::theme::Container::Custom(Box::new( ApplicationWrapperStyle {}, @@ -298,7 +331,7 @@ impl Centerpiece { let window = iced::window::Settings { transparent: true, - size: (650, 400), + size: (650, 375), decorations: false, level: iced::window::Level::AlwaysOnTop, resizable: false, @@ -423,7 +456,7 @@ impl Centerpiece { // iced::widget::scrollable::Id::new(SCROLLABLE_ID), // iced::widget::scrollable::AbsoluteOffset { x: 0.0, y: offset }, //) - + iced::Command::none() } fn select_next_plugin(&mut self) -> iced::Command { @@ -530,7 +563,7 @@ impl iced::application::StyleSheet for SandboxStyle { let color_settings = crate::settings::Settings::new(); iced::application::Appearance { - background_color: iced::Color::TRANSPARENT, + background_color: settings::hexcolor(&color_settings.color.background), text_color: settings::hexcolor(&color_settings.color.text), } } From 2576cfd5f4ce02371e87f5fb1846a3e22e5bba4a Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Tue, 23 Jul 2024 22:36:18 +0200 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=94=A5=20remove=20scroll=20to=20selec?= =?UTF-8?q?ted=20entry=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/main.rs | 46 +++++----------------------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) diff --git a/client/src/main.rs b/client/src/main.rs index 66a76d0..5b3b9a9 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -395,7 +395,7 @@ impl Centerpiece { fn select_first_entry(&mut self) -> iced::Command { self.active_entry_index = 0; - self.scroll_to_selected_entry() + iced::Command::none() } fn select_previous_entry(&mut self) -> iced::Command { @@ -406,11 +406,11 @@ impl Centerpiece { if self.active_entry_index == 0 { self.active_entry_index = entries.len() - 1; - return self.scroll_to_selected_entry(); + return iced::Command::none(); } self.active_entry_index -= 1; - self.scroll_to_selected_entry() + iced::Command::none() } fn select_next_entry(&mut self) -> iced::Command { @@ -420,42 +420,6 @@ impl Centerpiece { } self.active_entry_index += 1; - self.scroll_to_selected_entry() - } - - fn scroll_to_selected_entry(&self) -> iced::Command { - let plugin_index = match self.active_entry_id() { - Some(active_entry_id) => self - .plugins - .iter() - .filter(|plugin| plugin.entries.len() > 0) - .position(|plugin| { - plugin - .entries - .iter() - .any(|entry| entry.id.eq(active_entry_id)) - }) - .unwrap_or(0) as f32, - None => 0.0, - }; - let entry_index = self.active_entry_index as f32; - - // 1.0 REM line height + - // 2x0.5 REM padding + - // 0.3 REM for good luck :D - let entry_height = 2.3 * crate::REM; - // 0.75 REM line height + - // 2x0.5 REM padding + - // 2x0.75 REM padding + - // 0.32 REM for good luck :D - let plugin_header_height = 3.57 * crate::REM; - - let offset = (plugin_index * plugin_header_height) + (entry_index * entry_height); - // TODO: reimplement this - //iced::widget::scrollable::scroll_to( - // iced::widget::scrollable::Id::new(SCROLLABLE_ID), - // iced::widget::scrollable::AbsoluteOffset { x: 0.0, y: offset }, - //) iced::Command::none() } @@ -473,7 +437,7 @@ impl Centerpiece { .unwrap_or(self.active_entry_index); self.active_entry_index = accumulated_entries; - self.scroll_to_selected_entry() + iced::Command::none() } fn select_previous_plugin(&mut self) -> iced::Command { @@ -495,7 +459,7 @@ impl Centerpiece { .unwrap_or(0); self.active_entry_index = accumulated_entries; - self.scroll_to_selected_entry() + iced::Command::none() } fn register_plugin(&mut self, mut plugin: crate::model::Plugin) -> iced::Command { From cf8c0bc4786839afe0a8465b009f1d0639af6fa1 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Sat, 27 Jul 2024 12:13:28 +0200 Subject: [PATCH 4/7] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20render=20im?= =?UTF-8?q?plementation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/entry.rs | 1 + client/src/component/plugin_header.rs | 1 + client/src/main.rs | 67 ++++++++++++++------------- 3 files changed, 38 insertions(+), 31 deletions(-) diff --git a/client/src/component/entry.rs b/client/src/component/entry.rs index 85ed4de..6d56bc6 100644 --- a/client/src/component/entry.rs +++ b/client/src/component/entry.rs @@ -12,6 +12,7 @@ pub fn view(entry: &crate::model::Entry, active: bool) -> iced::Element<'static, ) .style(style(active)), ) + .height(2.25 * crate::REM) .padding(iced::Padding::from([0., 0.75 * crate::REM])) .into(); } diff --git a/client/src/component/plugin_header.rs b/client/src/component/plugin_header.rs index 3164f27..b5ecd25 100644 --- a/client/src/component/plugin_header.rs +++ b/client/src/component/plugin_header.rs @@ -7,6 +7,7 @@ pub fn view(plugin: &crate::model::Plugin) -> iced::Element<'static, crate::Mess monospaced: true, }) .size(0.75 * crate::REM)] + .height(2.25 * crate::REM) .padding(iced::Padding::from([ 0.8 * crate::REM, 1.25 * crate::REM, diff --git a/client/src/main.rs b/client/src/main.rs index 5b3b9a9..5246740 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -252,49 +252,54 @@ impl Application for Centerpiece { fn view(&self) -> iced::Element { let entries = self.entries(); - let mut lines_added = 0; - let mut entries_added = 0; - let mut lines = iced::widget::column![]; - while lines_added < 10 && lines_added < (entries.len() - self.active_entry_index) { - let entry_index_to_draw = self.active_entry_index + entries_added; + let mut lines = + iced::widget::column![].padding(iced::Padding::from([0., 0., 0.75 * crate::REM, 0.])); + let mut divider_added = true; + let mut header_added = false; + let mut next_entry_index_to_add = self.active_entry_index; + + for lines_added in 0..11 { + if next_entry_index_to_add >= entries.len() { + break; + } + + let mut plugin_to_add = None; let mut last_plugin_start_index = 0; for plugin in self.plugins.iter() { - if last_plugin_start_index == entry_index_to_draw { - if lines_added > 0 { - lines = lines.push( - iced::widget::column![iced::widget::horizontal_rule(1)].padding( - iced::Padding::from([1. * crate::REM, 0., 0.5 * crate::REM, 0.]), - ), - ); - } - - lines = lines.push(component::plugin_header::view(&plugin)); - lines_added += 1; + if last_plugin_start_index == next_entry_index_to_add { + plugin_to_add = Some(plugin); } - last_plugin_start_index += plugin.entries.len(); } - if lines_added == 0 && entries_added == 0 { + if !divider_added && plugin_to_add.is_some() { + lines = lines.push( + iced::widget::column![iced::widget::horizontal_rule(1)].padding( + iced::Padding::from([1. * crate::REM, 0., 0.5 * crate::REM, 0.]), + ), + ); + divider_added = true; + continue; + } + + if !header_added && plugin_to_add.is_some() { + lines = lines.push(component::plugin_header::view(plugin_to_add.unwrap())); + header_added = true; + continue; + } else if lines_added == 0 { lines = lines.push(component::entry::view( - entries[entry_index_to_draw - 1], + entries[next_entry_index_to_add - 1], false, )); - - lines_added += 1; - } - - if lines_added >= 10 { - break; } lines = lines.push(component::entry::view( - entries[entry_index_to_draw], - entry_index_to_draw == self.active_entry_index, + entries[next_entry_index_to_add], + next_entry_index_to_add == self.active_entry_index, )); - - lines_added += 1; - entries_added += 1; + divider_added = false; + header_added = false; + next_entry_index_to_add += 1; } iced::widget::container(iced::widget::column![ @@ -527,7 +532,7 @@ impl iced::application::StyleSheet for SandboxStyle { let color_settings = crate::settings::Settings::new(); iced::application::Appearance { - background_color: settings::hexcolor(&color_settings.color.background), + background_color: iced::Color::TRANSPARENT, text_color: settings::hexcolor(&color_settings.color.text), } } From be9967f03d07a897def7f4c531d216e9212b9510 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Sat, 27 Jul 2024 19:59:12 +0200 Subject: [PATCH 5/7] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20extract=20divider=20co?= =?UTF-8?q?mponent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/divider.rs | 14 ++++++++++++++ client/src/component/mod.rs | 1 + client/src/main.rs | 9 +++------ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 client/src/component/divider.rs diff --git a/client/src/component/divider.rs b/client/src/component/divider.rs new file mode 100644 index 0000000..02b1f53 --- /dev/null +++ b/client/src/component/divider.rs @@ -0,0 +1,14 @@ +pub fn view() -> iced::Element<'static, crate::Message> { + iced::widget::column![iced::widget::horizontal_rule(1)] + .padding(iced::Padding::from([ + 1. * crate::REM, + 0., + 0.5 * crate::REM, + 0., + ])) + // We're fixing the height here to unitfy it + // with the height of entries for a smooth + // scrolling experience + .height(crate::ENTRY_HEIGHT) + .into() +} diff --git a/client/src/component/mod.rs b/client/src/component/mod.rs index ad0a682..45299c3 100644 --- a/client/src/component/mod.rs +++ b/client/src/component/mod.rs @@ -1,3 +1,4 @@ +pub mod divider; pub mod entry; pub mod plugin_header; pub mod query_input; diff --git a/client/src/main.rs b/client/src/main.rs index 033664a..ad4f3c3 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -273,11 +273,7 @@ impl Application for Centerpiece { } if !divider_added && plugin_to_add.is_some() { - lines = lines.push( - iced::widget::column![iced::widget::horizontal_rule(1)].padding( - iced::Padding::from([1. * crate::REM, 0., 0.5 * crate::REM, 0.]), - ), - ); + lines = lines.push(component::divider::view()); divider_added = true; continue; } @@ -336,7 +332,7 @@ impl Centerpiece { let window = iced::window::Settings { transparent: true, - size: (650, 375), + size: (650, 380), decorations: false, level: iced::window::Level::AlwaysOnTop, resizable: false, @@ -523,6 +519,7 @@ impl Centerpiece { } pub const REM: f32 = 14.0; +pub const ENTRY_HEIGHT: f32 = 2.25 * crate::REM; struct SandboxStyle {} impl iced::application::StyleSheet for SandboxStyle { From 975d122d394c5a349e4be8184cc74fc2ffc4f799 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Sat, 27 Jul 2024 19:59:40 +0200 Subject: [PATCH 6/7] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20extract=20entry=20heig?= =?UTF-8?q?ht=20into=20a=20const?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/entry.rs | 5 ++++- client/src/component/plugin_header.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/component/entry.rs b/client/src/component/entry.rs index 20fcc07..de18068 100644 --- a/client/src/component/entry.rs +++ b/client/src/component/entry.rs @@ -12,7 +12,10 @@ pub fn view(entry: &crate::model::Entry, active: bool) -> iced::Element<'static, ) .style(style(active)), ) - .height(2.25 * crate::REM) + // We're fixing the height here to unitfy it + // with the height of plugin headers for a smooth + // scrolling experience + .height(crate::ENTRY_HEIGHT) .padding(iced::Padding::from([0., 0.75 * crate::REM])) .into(); } diff --git a/client/src/component/plugin_header.rs b/client/src/component/plugin_header.rs index b5ecd25..03ad66c 100644 --- a/client/src/component/plugin_header.rs +++ b/client/src/component/plugin_header.rs @@ -7,7 +7,10 @@ pub fn view(plugin: &crate::model::Plugin) -> iced::Element<'static, crate::Mess monospaced: true, }) .size(0.75 * crate::REM)] - .height(2.25 * crate::REM) + // We're fixing the height here to unitfy it + // with the height of entries for a smooth + // scrolling experience + .height(crate::ENTRY_HEIGHT) .padding(iced::Padding::from([ 0.8 * crate::REM, 1.25 * crate::REM, From 2a37e1f058d287e334bff2d82cb379c160fc6228 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Mon, 29 Jul 2024 20:29:07 +0200 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=93=9D=20fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/component/divider.rs | 2 +- client/src/component/entry.rs | 2 +- client/src/component/plugin_header.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/component/divider.rs b/client/src/component/divider.rs index 02b1f53..d3ee51d 100644 --- a/client/src/component/divider.rs +++ b/client/src/component/divider.rs @@ -6,7 +6,7 @@ pub fn view() -> iced::Element<'static, crate::Message> { 0.5 * crate::REM, 0., ])) - // We're fixing the height here to unitfy it + // We're fixing the height here to unify it // with the height of entries for a smooth // scrolling experience .height(crate::ENTRY_HEIGHT) diff --git a/client/src/component/entry.rs b/client/src/component/entry.rs index de18068..f8f34bd 100644 --- a/client/src/component/entry.rs +++ b/client/src/component/entry.rs @@ -12,7 +12,7 @@ pub fn view(entry: &crate::model::Entry, active: bool) -> iced::Element<'static, ) .style(style(active)), ) - // We're fixing the height here to unitfy it + // We're fixing the height here to unify it // with the height of plugin headers for a smooth // scrolling experience .height(crate::ENTRY_HEIGHT) diff --git a/client/src/component/plugin_header.rs b/client/src/component/plugin_header.rs index 03ad66c..35f2bf4 100644 --- a/client/src/component/plugin_header.rs +++ b/client/src/component/plugin_header.rs @@ -7,7 +7,7 @@ pub fn view(plugin: &crate::model::Plugin) -> iced::Element<'static, crate::Mess monospaced: true, }) .size(0.75 * crate::REM)] - // We're fixing the height here to unitfy it + // We're fixing the height here to unify it // with the height of entries for a smooth // scrolling experience .height(crate::ENTRY_HEIGHT)