Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.68k stars 44 forks source link

Tray icon with system themed icons #145

Closed rauldipeas closed 2 years ago

rauldipeas commented 2 years ago

Relevant components

Is your feature request specific to a certain platform/environment? Please specify. Kubuntu 22.04

Is your feature request related to a problem? Please describe. I'm looking for a way to use system theme icons on tray icon, different from the icons bundled with the app.

Describe the solution you'd like ...

Describe alternatives you've considered ...

Additional context Screenshot_20220720_115634

Martchus commented 2 years ago

Using an icon from the theme would generally be possible but there is one hurdle: I suppose no themes provide icons for all the states Syncthing Tray supports. So one needed to adjust the coloring of the icon from the theme and add the small badge accordingly. Not impossible but quite some effort to get right.

That's why I added the coloring settings instead. Those should be sufficient in most cases. In fact, the icon in your screenshot actually already fits in quite nicely.

By the way, when talking about the Plasmoid, the icon from the current FreeDesktop icon theme might also not fit into the icons from the current Plasma theme perfectly.

rauldipeas commented 2 years ago

I can ask for all icons on the GitHub of icon theme I'm using(Papirus/Hardcode-tray), but you're right, it's a lot of effort.

I've tried to resize icon through the settings, but doesn't work as expected, when I restart de app the icon get low resolution instead of be on requested size.

It's possible to solve it? It's enough to fit perfectly on my panel.

Martchus commented 2 years ago

I can ask for all icons on the GitHub of icon theme I'm using(Papirus/Hardcode-tray), but you're right, it's a lot of effort.

I assume you mean https://github.com/bilelmoussaoui/Hardcode-Tray. If they'd add icons for all states on their side I would not need to do anything clever on my side at least. It would still be some effort on my side adding the config option and having multiple rendering paths internally.

I also still don't see the benefit. What kind of icon do you want? It would by Syncthing's icon anyways, right? And it always looks quite similar. You can already adjust colors. I suppose the only thing left to customize is the line thickness. The icon in your screenshot already fits in nicely without any further adjustments if you ask me.

I've tried to resize icon through the settings, but doesn't work as expected, when I restart de app the icon get low resolution instead of be on requested size.

Restart the app? So you're using the Qt Widgets based version under Plasma (and not the Plasmoid) and settings don't survive restarting it? I'm also wondering what you're trying to achieve here. Your panel seems to have a normal height with ordinarily sized icons so the default rendering resolution should be sufficient.

It's possible to solve it? It's enough to fit perfectly on my panel.

I'm not sure whether I'm following. Solve what exactly now? Note that the size that's configurable in the settings does not determine the size of the icon in the panel. It is just the internal rendering resolution. It is still up to the shell to decide how big the icons should be displayed.

rauldipeas commented 2 years ago

The icon in your screenshot already fits in nicely without any further adjustments if you ask me.

No, it doesn't fit well, it's slightly bigger than others, if I can adjust the size it would be enough.

What kind of icon do you want?

Papirus already have syncthing icons for the panel in the right size.

Martchus commented 2 years ago

No, it doesn't fit well, it's slightly bigger than others, if I can adjust the size it would be enough.

Right, its top edge is one pixel above and its bottom edge one pixel below the other icon's top/bottom edges. I suppose that's most likely because the other icons have more padding. (As mentioned before, the rendering resolution you can select in Syncthing Tray should not have any effect because it is still up to the shell to decide how big to draw the pixmaps.) So maybe it makes sense if I add an option to select the padding. That should be quite easy to implement.

Papirus already have syncthing icons for the panel in the right size.

I can checkout their icons. Maybe they just include more padding.

rauldipeas commented 2 years ago

Bingo! Padding should fix my issue, thanks for helping me. 😄

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.