diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-09 22:04:22 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2022-08-09 22:04:22 +0300 |
| commit | 2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9 (patch) | |
| tree | b27d220361c8a54ef73a30aabe493bdce1dd4111 /src/bar.rs | |
| parent | 1851c56e407cac72ca104cc5e75692cd9c648986 (diff) | |
| download | i3bar-mango-2a3c0d9ceac54c9f6d9312c610d2a161a4bb37c9.tar.gz | |
some renames
Diffstat (limited to 'src/bar.rs')
| -rw-r--r-- | src/bar.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -20,7 +20,7 @@ use crate::{ }; pub struct Bar { - pub first_configure: bool, + pub configured: bool, pub width: u32, pub height: u32, pub scale: i32, @@ -35,12 +35,12 @@ pub struct Bar { impl Bar { pub fn configure(&mut self, ss: &mut SharedState, width: u32) { - if self.width != width { + if self.width != width && width != 0 { self.width = width; self.layer.set_exclusive_zone(self.height as i32); } - self.first_configure = false; + self.configured = true; self.draw(ss); } @@ -84,7 +84,7 @@ impl Bar { } pub fn draw(&mut self, ss: &mut SharedState) { - if self.first_configure { + if !self.configured { return; } |
