Skip to content

feat: Make Cosmic Files show .exe icons like Dolphin - #1875

Open
ZlordHUN wants to merge 8 commits into
pop-os:masterfrom
ZlordHUN:exe-icons
Open

feat: Make Cosmic Files show .exe icons like Dolphin#1875
ZlordHUN wants to merge 8 commits into
pop-os:masterfrom
ZlordHUN:exe-icons

Conversation

@ZlordHUN

@ZlordHUN ZlordHUN commented Jun 21, 2026

Copy link
Copy Markdown
Contributor
image image
  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

Comment thread src/exe_icon.rs Outdated
@Milli189

This comment was marked as off-topic.

@ZlordHUN

Copy link
Copy Markdown
Contributor Author

Hasn't been reviewed since I fixed what was pointed out

@Milli189

This comment was marked as off-topic.

@jackpot51
jackpot51 requested review from a team August 26, 2026 22:06
Comment thread src/exe_icon.rs Outdated
@ZlordHUN
ZlordHUN requested a review from jackpot51 August 27, 2026 07:01
@jklgrasso

Copy link
Copy Markdown

It looks like some of the thumbnails aren't PNGs (or they don't all have a transparent background when created).

Screenshot_2026-08-27_08-19-22

I used https://omnvert.com/en/tools/exe-viewer to quickly get a couple of the .ico files (in the screenshot). The .ico files I downloaded from that website have transparent backgrounds, but the icons for SpotifySetup.exe and DiscordSetup.exe do not.

@jklgrasso jklgrasso self-assigned this Aug 27, 2026

@jackpot51 jackpot51 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.

It looks good, but I'm not sure why there needs to be a bundled thumbnailer. Once the thumbnailer file is installed in /usr/share/thumbnailers, then it will be loaded as an external thumbnailer from there

@ZlordHUN
ZlordHUN requested a review from jackpot51 August 27, 2026 20:57
jklgrasso
jklgrasso previously approved these changes Aug 28, 2026

@jklgrasso jklgrasso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The previously mentioned app icons are correct now.

Regression testing passed

Checklist

Basic navigation

  • Middle-click opens directory in a new tab (not focused).
  • Open two scrollable tabs. Scroll one tab, then switch to the other tab; it should not have scrolled.
  • Hover over the top item in the folder, then scroll down until it's out of view (while still hovered).
    On scrolling back up (with the mouse in a different position), the item should not have the hover highlight.
  • Right-click an item in the sidebar. No visual change should occur with the rest of the items.
  • Remove an item from the sidebar, then re-pin it.

File operations

  • Right-click -> Create a new folder, then enter it.
  • Right-click in the empty folder -> Create a new file.
  • Navigate to the parent folder, create another new file, then drag it into the created folder.
  • Files can be renamed.
  • Files can be opened with non-default apps & browsing store for new apps works.
  • Normal right-click shows Move to trash option.
  • Shift right-click, and right-click followed by Shift, both show Permanently delete option.

Advanced navigation & view settings

  • Image and video thumbnails generate & display in local folders.
  • Gallery preview shows with Spacebar.
  • Details pane shows with Ctrl+Spacebar.
  • Zoom in/out and reset to default zoom work.
  • Ctrl+1 and Ctrl+2 switch between list and icon view.
  • Ctrl+H shows/hides hidden files.
  • Directories can be sorted at top or inline.
  • Settings -> Theme works.
  • Settings -> Type to Search affects behavior as designed.
  • Single-click to open setting takes effect.
  • Sorting options work.
  • Cutting, copying, and pasting files works.
  • F5 reloads current directory.
  • Left sidebar can be collapsed and expanded.

External filesystems

  • Add a network drive (e.g. SFTP) and navigate into it.
  • Plug in a USB drive; able to mount, browse, and eject.

Integrations

  • Desktop icons display as expected
  • Drag-and-drop into Firefox works

Comment thread src/tab.rs Outdated
}

#[cfg(debug_assertions)]
fn dev_exe_thumbnail(path: &Path, metadata: &ItemMetadata, thumbnail_size: u32) -> Self {

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.

Again, I am not sure why you need to embed the thumbnailer when there is an external one

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 PR is very close. If you'd like, I can merge it to an upstream branch and finish it. I will likely move the exe thumbnailer to another crate, so it is minimal and totally separate from the GUI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry :D I keep working on this late at night. All good now? If not, sure merge it and finish it. Thank you either way!

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.

4 participants