diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2021-08-13 22:23:09 -0400 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2021-08-23 16:55:32 -0400 |
commit | fceae8d4426eb5e81a883e5ecb32363c8dc77974 (patch) | |
tree | 4b4d5b529cde95caddc224aeba5c2f5fc68e70bc /src/app.rs | |
parent | 5749c32bd56e5b08ada9ead3f47b1d190e5e86ec (diff) |
refactor: clean up some states and code
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -4,7 +4,7 @@ pub mod filter; pub mod layout_manager; mod process_killer; pub mod query; -pub mod widget_states; +pub mod widgets; use std::{ cmp::{max, min}, @@ -21,10 +21,11 @@ use data_farmer::*; use data_harvester::{processes, temperature}; pub use filter::*; use layout_manager::*; -pub use widget_states::*; +pub use widgets::*; use crate::{ - canvas, constants, + canvas, + constants::{self, MAX_SIGNAL}, units::data_units::DataUnit, utils::error::{BottomError, Result}, Pid, @@ -128,13 +129,6 @@ pub struct AppState { pub filters: DataFilters, } -#[cfg(target_os = "windows")] -const MAX_SIGNAL: usize = 1; -#[cfg(target_os = "linux")] -const MAX_SIGNAL: usize = 64; -#[cfg(target_os = "macos")] -const MAX_SIGNAL: usize = 31; - impl AppState { pub fn reset(&mut self) { // Reset multi |