Use correct defaults for GfxMode and GfxPower

This commit is contained in:
Luke D. Jones
2022-12-07 12:06:18 +13:00
parent 5469c73f11
commit 93d472fe74
2 changed files with 2 additions and 3 deletions

View File

@@ -11,7 +11,6 @@ mocking = []
[dependencies]
egui = { git = "https://github.com/flukejones/egui", branch = "wayland_dark_theme" }
eframe= { git = "https://github.com/flukejones/egui", branch = "wayland_dark_theme" }
#eframe= { git = "https://github.com/emilk/egui", default-features = false, features = ["dark-light", "default_fonts", "wgpu"] }
libappindicator = "0.7" # Tray icon
gtk = "0.15.5"

View File

@@ -228,8 +228,8 @@ impl GfxState {
pub fn new(_supported: &SupportedFunctions, dbus: &GfxProxyBlocking<'_>) -> Result<Self> {
Ok(Self {
has_supergfx: dbus.mode().is_ok(),
mode: dbus.mode().unwrap_or_default(),
power_status: dbus.power().unwrap_or_default(),
mode: dbus.mode().unwrap_or(GfxMode::None),
power_status: dbus.power().unwrap_or(GfxPower::Unknown),
})
}
}