mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-06 23:02:33 +00:00
WIP - fix scrollbar taking bigger area than it should
This commit is contained in:
parent
b0d9e24f1f
commit
d450c8d7ad
@ -51,7 +51,11 @@ impl ScrollBar {
|
||||
|
||||
/// The width the scrollbar will really occupy.
|
||||
pub fn overall_width(&self) -> i16 {
|
||||
Self::DOTS_INTERVAL * self.page_count as i16 - Self::DOTS_DISTANCE
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user