mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-07 15:18:08 +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.
|
/// The width the scrollbar will really occupy.
|
||||||
pub fn overall_width(&self) -> i16 {
|
pub fn overall_width(&self) -> i16 {
|
||||||
|
if self.page_count <= MAX_DOTS {
|
||||||
Self::DOTS_INTERVAL * self.page_count as i16 - Self::DOTS_DISTANCE
|
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) {
|
pub fn set_page_count(&mut self, page_count: usize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user