Debian Codegraph @

src/options/config/style/battery.rs

raw symbols SCIP
1 use serde::{Deserialize, Serialize};
2
3 use super::ColourStr;
4
5 /// Styling specific to the battery widget.
6 #[derive(Clone, Debug, Default, Deserialize, Serialize)]
7 #[cfg_attr(feature = "generate_schema", derive(schemars::JsonSchema))]
8 #[cfg_attr(test, serde(deny_unknown_fields), derive(PartialEq, Eq))]
9 pub(crate) struct BatteryStyle {
10 /// The colour of the battery widget bar when the battery is over 50%.
11 #[serde(alias = "high_battery_color")]
12 pub(crate) high_battery_colour: Option<ColourStr>,
13
14 /// The colour of the battery widget bar when the battery between 10% to
15 /// 50%.
16 #[serde(alias = "medium_battery_color")]
17 pub(crate) medium_battery_colour: Option<ColourStr>,
18
19 /// The colour of the battery widget bar when the battery is under 10%.
20 #[serde(alias = "low_battery_color")]
21 pub(crate) low_battery_colour: Option<ColourStr>,
22 }