panel: Apply a hard limit of 1/2 height
This commit is contained in:
@ -241,6 +241,7 @@ impl Application {
|
||||
fn get_preferred_height(output: &OutputState) -> Option<u32> {
|
||||
output.get_pixel_size()
|
||||
.map(|px_size| {
|
||||
let height = {
|
||||
if px_size.width > px_size.height {
|
||||
px_size.width / 5
|
||||
} else {
|
||||
@ -251,6 +252,8 @@ impl Application {
|
||||
px_size.width * 7 / 22
|
||||
}
|
||||
}
|
||||
};
|
||||
cmp::min(height, px_size.height / 2)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user