[fix]: a lot more custom icons and learing how cfg! works
Some checks failed
/ clippy (push) Failing after 6m12s
/ test (push) Failing after 6m49s

This commit is contained in:
Chris Cochrun 2026-05-01 06:32:15 -05:00
parent 193a745cff
commit a686ed7d52
3 changed files with 22 additions and 5 deletions

1
res/edit.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-edit"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M8 7a1 1 0 0 1 -1 1h-1a1 1 0 0 0 -1 1v9a1 1 0 0 0 1 1h9a1 1 0 0 0 1 -1v-1a1 1 0 0 1 2 0v1a3 3 0 0 1 -3 3h-9a3 3 0 0 1 -3 -3v-9a3 3 0 0 1 3 -3h1a1 1 0 0 1 1 1" /><path d="M14.596 5.011l4.392 4.392l-6.28 6.303a1 1 0 0 1 -.708 .294h-3a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 .294 -.708zm6.496 -2.103a3.097 3.097 0 0 1 .165 4.203l-.164 .18l-.693 .694l-4.387 -4.387l.695 -.69a3.1 3.1 0 0 1 4.384 0" /></svg>

After

Width:  |  Height:  |  Size: 617 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-presentation-analytics"><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M21 3a1 1 0 0 1 0 2v9a3 3 0 0 1 -3 3h-5v2h2a1 1 0 0 1 0 2h-6a1 1 0 0 1 0 -2h2v-2h-5a3 3 0 0 1 -3 -3v-9a1 1 0 1 1 0 -2zm-12 4a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1m6 2a1 1 0 0 0 -1 1v2a1 1 0 0 0 2 0v-2a1 1 0 0 0 -1 -1m-3 1a1 1 0 0 0 -1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0 -1 -1" /></svg>

After

Width:  |  Height:  |  Size: 537 B

View file

@ -535,9 +535,15 @@ impl cosmic::Application for App {
tooltip(
button::custom(
row!(
Container::new(
icon::from_name("document-edit-symbolic").scale(3)
)
Container::new(if self.editor_mode.is_some() {
icon::from_path("./res/presentation-analytics.svg".into())
.symbolic(true)
.apply(icon::icon)
} else {
icon::from_path("./res/edit.svg".into())
.symbolic(true)
.apply(icon::icon)
})
.center_y(Length::Fill),
text::body(if self.editor_mode.is_some() {
"Present Mode"
@ -556,14 +562,23 @@ impl cosmic::Application for App {
tooltip(
button::custom(
row!(
Container::new(
Container::new(if cfg!(target_os = "linux") {
icon::from_name(if self.presentation_open {
"window-close-symbolic"
} else {
"view-presentation-symbolic"
})
.scale(3)
)
.icon()
} else {
if self.presentation_open {
icon::from_name("window-close-symbolic").scale(3).icon()
} else {
icon::from_path("./res/presentation-analytics.svg".into())
.symbolic(true)
.apply(icon::icon)
}
})
.center_y(Length::Fill),
text
)