From 975d122d394c5a349e4be8184cc74fc2ffc4f799 Mon Sep 17 00:00:00 2001 From: Christian Friedow Date: Sat, 27 Jul 2024 19:59:40 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20extract=20entry=20height?= =?UTF-8?q?=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,