Skip to content

feat: use superior icon resolution from libcosmic - #379

Open
ZeusCraft10 wants to merge 2 commits into
pop-os:masterfrom
ZeusCraft10:fix-missing-icons
Open

feat: use superior icon resolution from libcosmic#379
ZeusCraft10 wants to merge 2 commits into
pop-os:masterfrom
ZeusCraft10:fix-missing-icons

Conversation

@ZeusCraft10

@ZeusCraft10 ZeusCraft10 commented Dec 30, 2025

Copy link
Copy Markdown

Enables the 'desktop' feature for libcosmic and uses 'as_cosmic_icon()' for search results to match the Applications overview behavior. This ensures that icons resolved to absolute paths by the launcher service (or themed icons) are correctly loaded.

References pop-os/cosmic-epoch#2847

mmstick
mmstick previously approved these changes Dec 30, 2025
@jacobgkau
jacobgkau requested a review from a team January 20, 2026 20:59
@jacobgkau jacobgkau self-assigned this Jan 20, 2026

@jacobgkau jacobgkau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch seems to introduce a build failure.

Output from a local build (also failing on the build server):
   Compiling cosmic-launcher v1.0.3 (/home/jacob/Work/cosmic-launcher)
   Compiling humantime v2.3.0
   Compiling apply v0.3.0
   Compiling unicode-width v0.2.2
   Compiling css-color v0.2.8
   Compiling unicode-truncate v2.0.1
   Compiling console-subscriber v0.5.0
   Compiling pop-launcher-service v1.2.7 (https://github.com/pop-os/launcher/#eead361c)
   Compiling tracing-journald v0.3.2
   Compiling switcheroo-control v0.1.0 (https://github.com/pop-os/dbus-settings-bindings#87c3c356)
warning: unexpected `cfg` condition value: `a11y`
   --> src/components/list.rs:302:11
    |
302 |     #[cfg(feature = "a11y")]
    |           ^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `console`, `default`, and `wgpu`
    = help: consider adding `a11y` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

error[E0599]: no method named `size` found for struct `cosmic::widget::icon::Handle` in the current scope
   --> src/app.rs:541:46
    |
539 | / ...                   desktop::fde::IconSource::from_unknown(&**name)
540 | | ...                       .as_cosmic_icon()
541 | | ...                       .size(64)
    | |                           -^^^^ method not found in `cosmic::widget::icon::Handle`
    | |___________________________|
    |

For more information about this error, try `rustc --explain E0599`.
warning: `cosmic-launcher` (bin "cosmic-launcher") generated 1 warning
error: could not compile `cosmic-launcher` (bin "cosmic-launcher") due to 1 previous error; 1 warning emitted
error: Recipe `build-debug` failed on line 45 with exit code 101
make[1]: *** [debian/rules:28: override_dh_auto_build] Error 101
make[1]: Leaving directory '/home/jacob/Work/cosmic-launcher'
make: *** [debian/rules:8: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Enables the 'desktop' feature for libcosmic and uses 'as_cosmic_icon()' for search results to match the Applications overview behavior.

@jacobgkau jacobgkau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not seeing any differences in icon quality with this change. (E.g. gThumb still has a very low-resolution/blurry icon... but also not seeing anything done worse.)

Regression testing passed:

Launcher

  • All windows on all workspaces appear on launch
  • Choosing an app on another workspace moves workspaces and focus to that app
  • Launching an application works
  • Typing text and then removing it will re-show those windows
  • Search works for applications and windows
  • Search works for COSMIC settings panels
  • Open windows are sorted above applications (e.g. "firefox")
  • t: executes a command in a terminal
  • : executes a command in sh
  • = calculates an equation
  • Search results are as expected:
    • cal returns LibreOffice Calc first
    • pops returns Popsicle first
    • shop returns the COSMIC Store first

@ZeusCraft10 Just pinging in case you want to double-check that you did everything you intended with this PR? The diff before the last force-push was larger than it currently is. Is just adding the use cosmic::desktop; line really enough to make icons higher-quality? Do you have any examples of ones that are improved with this?

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.

3 participants