Skip to content

Commit

Permalink
♻️ extract entry height into a const
Browse files Browse the repository at this point in the history
  • Loading branch information
friedow committed Jul 27, 2024
1 parent be9967f commit 975d122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client/src/component/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
5 changes: 4 additions & 1 deletion client/src/component/plugin_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 975d122

Please sign in to comment.