Limit number of app list dots to 3
This commit is contained in:
parent
090bb9653f
commit
05af004ce5
1 changed files with 2 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
use std::cmp::min;
|
||||||
use switcheroo_control::Gpu;
|
use switcheroo_control::Gpu;
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
@ -141,7 +142,7 @@ impl DockItem {
|
||||||
.size(applet.suggested_size().0);
|
.size(applet.suggested_size().0);
|
||||||
|
|
||||||
let dot_radius = 2;
|
let dot_radius = 2;
|
||||||
let dots = (0..toplevels.len())
|
let dots = (0..min(toplevels.len(), 3))
|
||||||
.map(|_| {
|
.map(|_| {
|
||||||
container(vertical_space(Length::Fixed(0.0)))
|
container(vertical_space(Length::Fixed(0.0)))
|
||||||
.padding(dot_radius)
|
.padding(dot_radius)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue