1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-07 07:12:34 +00:00

WIP - fix scrollbar taking bigger area than it should

This commit is contained in:
grdddj 2022-12-31 15:30:43 +01:00
parent b0d9e24f1f
commit d450c8d7ad

View File

@ -51,7 +51,11 @@ impl ScrollBar {
/// The width the scrollbar will really occupy.
pub fn overall_width(&self) -> i16 {
if self.page_count <= MAX_DOTS {
Self::DOTS_INTERVAL * self.page_count as i16 - Self::DOTS_DISTANCE
} else {
Self::MAX_WIDTH
}
}
pub fn set_page_count(&mut self, page_count: usize) {