Skip to content

core: Icons add searching custom file paths #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CMurtagh-LGTM
Copy link
Contributor

@CMurtagh-LGTM CMurtagh-LGTM commented Aug 18, 2025

Fixes: #147

This is basically just @Kruziikrel13's QML code ported to C++.

This works, haven't had any bad tray icons using this code

  IconImage {
    source: {
      let icon = root.item.icon;
      if (icon.includes("?path=")) {
        const [name, path] = icon.split("?path=");
        icon = `file://${path}/${name.slice(name.lastIndexOf("/") + 1)}`;
      }
      return icon;
    }
    asynchronous: true
    implicitSize: ShellGlobals.sizes.font.normal * 1.1
  }

The main difference is that Kruziikrel13 does this before qt checks the QQuickPixmapCache enabling use of the QML's cache but is overriding the default icon.

core: remove filetype checking as qt will do this for us
@CMurtagh-LGTM CMurtagh-LGTM changed the title core: add searching custom file paths core: Icons add searching custom file paths Aug 20, 2025
@CMurtagh-LGTM CMurtagh-LGTM force-pushed the master branch 2 times, most recently from 81ac6b5 to c8423a4 Compare August 20, 2025 08:13
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.

Need system tray custom icon support
1 participant