Implement condensed list view

This commit is contained in:
Jeremy Soller 2024-02-29 19:47:27 -07:00
parent d485e51acb
commit f8521d5b0d
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
4 changed files with 113 additions and 59 deletions

View file

@ -12,6 +12,7 @@ pub const CONFIG_VERSION: u64 = 1;
// Default icon sizes
const ICON_SIZE_LIST: u16 = 24;
const ICON_SIZE_LIST_CONDENSED: u16 = 48;
const ICON_SIZE_GRID: u16 = 64;
// TODO: 5 is an arbitrary number. Maybe there's a better icon size max
const ICON_SCALE_MAX: u16 = 5;
@ -98,6 +99,10 @@ impl IconSizes {
percent!(self.list, ICON_SIZE_LIST) as _
}
pub fn list_condensed(&self) -> u16 {
percent!(self.list, ICON_SIZE_LIST_CONDENSED) as _
}
pub fn grid(&self) -> u16 {
percent!(self.grid, ICON_SIZE_GRID) as _
}