tiling: Adjust icon to reflect tiling state of the current workspace
This commit is contained in:
parent
7d6eb0b523
commit
b7c6cc0a97
1 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ use std::time::Instant;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
const ID: &str = "com.system76.CosmicAppletTiling";
|
const ID: &str = "com.system76.CosmicAppletTiling";
|
||||||
|
const ON: &str = "com.system76.CosmicAppletTiling.On";
|
||||||
const OFF: &str = "com.system76.CosmicAppletTiling.Off";
|
const OFF: &str = "com.system76.CosmicAppletTiling.Off";
|
||||||
|
|
||||||
static TILE_WINDOWS: Lazy<id::Toggler> = Lazy::new(id::Toggler::unique);
|
static TILE_WINDOWS: Lazy<id::Toggler> = Lazy::new(id::Toggler::unique);
|
||||||
|
|
@ -300,7 +301,7 @@ impl cosmic::Application for Window {
|
||||||
fn view(&self) -> Element<Self::Message> {
|
fn view(&self) -> Element<Self::Message> {
|
||||||
self.core
|
self.core
|
||||||
.applet
|
.applet
|
||||||
.icon_button(OFF)
|
.icon_button(if self.autotiled { ON } else { OFF })
|
||||||
.on_press(Message::TogglePopup)
|
.on_press(Message::TogglePopup)
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue