Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@NamorNiradnug
Copy link
Collaborator

No description provided.

@NamorNiradnug
Copy link
Collaborator Author

I'm also thinking about a fallback icon. Although I'm not sure if it's better than no icon at all.

@soreau
Copy link
Member

soreau commented Jun 19, 2024

I'm also thinking about a fallback icon. Although I'm not sure if it's better than no icon at all.

Yes, I think it is a fine idea.

@NamorNiradnug
Copy link
Collaborator Author

NamorNiradnug commented Jun 20, 2024

Well... I tried... Tbh I don't really like how it looks like, but I don't know how to make it better.

@soreau
Copy link
Member

soreau commented Jun 20, 2024

Well... I tried... Tbh I don't really like how does it look like, but I don't know how to make it better.

Ok, thanks. I'll have a look when I have some time.

@soreau
Copy link
Member

soreau commented Aug 8, 2025

@NamorNiradnug How about reusing the wcm.svg icon (that is the wayfire badge) like this?

diff --git a/src/wcm.cpp b/src/wcm.cpp
index 3624912..3db1d66 100644
--- a/src/wcm.cpp
+++ b/src/wcm.cpp
@@ -1128,10 +1128,18 @@ MainPage::Category::Category(const Glib::ustring & name,
 
 void Plugin::init_widget()
 {
+    const auto icon_path = WCM::get_instance()->find_icon("plugin-" + name + ".svg");
+    if (std::filesystem::exists(icon_path))
+    {
+        icon.set(icon_path);
+    } else
+    {
+        icon.set_from_icon_name("wcm", Gtk::ICON_SIZE_DND);
+    }
+
+    button_layout.pack_start(icon);
     label.set_text(disp_name);
     label.set_ellipsize(Pango::ELLIPSIZE_END);
-    icon.set(WCM::get_instance()->find_icon("plugin-" + name + ".svg"));
-    button_layout.pack_start(icon);
     button_layout.pack_start(label);
     button_layout.set_halign(Gtk::ALIGN_START);
     button.set_tooltip_markup(tooltip);
wcm-missing-icons

@NamorNiradnug
Copy link
Collaborator Author

Yeah, I think it looks better like this.
I'll update the PR later today.

@soreau
Copy link
Member

soreau commented Aug 8, 2025

Thanks!

@soreau soreau merged commit 276cf49 into WayfireWM:master Aug 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants