From b7c6cc0a97da1433b706fbde2ba682ecc8439789 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 20 Feb 2024 20:35:33 +0100 Subject: [PATCH] tiling: Adjust icon to reflect tiling state of the current workspace --- cosmic-applet-tiling/src/window.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cosmic-applet-tiling/src/window.rs b/cosmic-applet-tiling/src/window.rs index c6f28690..8b461af4 100644 --- a/cosmic-applet-tiling/src/window.rs +++ b/cosmic-applet-tiling/src/window.rs @@ -23,6 +23,7 @@ use std::time::Instant; use tracing::error; const ID: &str = "com.system76.CosmicAppletTiling"; +const ON: &str = "com.system76.CosmicAppletTiling.On"; const OFF: &str = "com.system76.CosmicAppletTiling.Off"; static TILE_WINDOWS: Lazy = Lazy::new(id::Toggler::unique); @@ -300,7 +301,7 @@ impl cosmic::Application for Window { fn view(&self) -> Element { self.core .applet - .icon_button(OFF) + .icon_button(if self.autotiled { ON } else { OFF }) .on_press(Message::TogglePopup) .into() }