tsujan / FeatherPad

Lightweight Qt Plain-Text Editor for Linux
GNU General Public License v3.0
391 stars 67 forks source link

System icon theme support on Linux #390

Closed varlesh closed 2 years ago

varlesh commented 4 years ago

@tsujan Hi. How you know, hardcoded style & icons it's not good for us. Please add option on Linux use icons from current icon theme. Thanks )) Also FeatherNotes used qrc too...

varlesh commented 4 years ago

Similar solution used on Clementine: image

tsujan commented 4 years ago

@varlesh System icons were supported in very old versions but now, there are icons that can't be found in some well-known icon sets. So, I decided to use hard-coded symbolic icons. They aren't ordinary icons like in other apps but change color according to the widget style in all desktop environments and are simple enough to be usable everywhere.

Mixing hard-coded icons with system icons had 2 problems: (1) Cluttered code; and (2) ugliness.

Particularly featherNotes has icons that can't be found in many sets but that's true for FeatherPad too.

varlesh commented 4 years ago

Disagree with you. Mostly icon names you use - this icons already exist on popular icon themes. I think it's not good way hardcoded icons on apps. Anyway if icon not available on current icon theme - icon request as solution for that. How added new icons for new apps?

I know about color scheme and freedesktop standart, but you locked unification for interface. Icon theme Papirus - i'm main developer and this icon theme used by default on lubuntu! But impossible use single style for all Qt-apps, if icons hardcoded.

tsujan commented 4 years ago

Mostly icon names you use - this icons already exist on popular icon themes.

See the screenshot:

special_icons

Apart from that, I can't let a button remain without icon in FeatherPad, in case its icon isn't found in a set, because there isn't enough space for long texts.

System icons can be trusted when the app doesn't have special icons or can tolerate missing icons.

Consider the hard-coded icons like fonts.

varlesh commented 4 years ago

But it's not you problem! It's problem icon theme developer. If he want add support your app - he added this icons.... I think, it's bad way go in cycles with only Breeze icon theme and hardcoded icons on apps. It's KDE way... only this icons, only our style(( We support color scheme css... as i know, only Breeze & Papirus support that. Also if you not found needed icon on breeze - open request, PR? Or use fallback as another solution

tsujan commented 4 years ago

i'm main developer

I know that. Your icon sets are very beautiful and I've seen LXQt users having them. I also know about styling.

However, there are practical considerations here and there, that aren't so obvious. One of them is what is called "auto-mnemonics". KDE enforces them on buttons with texts and that ruins app shortcuts. But if it's guaranteed that no button is without icon, KDE couldn't enforce its damn auto-mnemonics.

And really, black or white icons are like texts and don't interfere with any style.

It's problem icon theme developer.

I try to avoid problems that are created by others in my apps, as far as possible -- especially in an app that's supposed to work everywhere, even under Gnome+Wayland.

I'm sure you know how different GTK and KDE based icon sets are. I can't wait until such differences are removed. Actually, they will never be removed.

I close this but feel free to add comments if you think there's something I should know.

varlesh commented 4 years ago

You member LXQt Team. Why your team don't want create main icon theme for LXQt - with style, needed icon names, ideas and ets? Why you want depend from Breeze?

varlesh commented 4 years ago

Please not tell me about independence. Because modern popular DE's have icon theme. Gnome - Adwaita KDE - Breeze XFCE - Elementary XFCE Cinnamon - Mint Y/X LXQt - ?

varlesh commented 4 years ago

I can help with icon theme, if needed

tsujan commented 4 years ago

Why your team don't want create main icon theme for LXQt

Because we don't want to reinvent the wheel in LXQt. What other DEs have done is more than enough. They did the same thing again and again, for no good reason.

Please not tell me about independence. Because modern popular DE's have icon theme.

Icon set is not an indispensable part of a DE.

varlesh commented 4 years ago

I do not want to offend you, but you are very conservative. Breeze - it's part KDE, but not LXQt. KDE devs never make concessions. It's limit your & LXQt development. It's very sad :(

tsujan commented 4 years ago

I do not want to offend you

No offense taken. I know you, after all :)

See how KDE5 wants to make the ugly Breeze widget style like a special thing and how Gnome3 wants to pretend that GTK should not be styled. In older times, when I started to use Linux, people didn't waste time and resources on such things; instead, they worked to increase the quality of their apps -- you could use any style you wanted and no one was offended. Nowadays, quality isn't so important; "branding" is.

We don't want that kind of branding for LXQt. That's different from being conservative.

tsujan commented 4 years ago

I should emphasize that what I say is my own opinion, not LXQt's.

However, there were reasons why I was attracted to LXQt and became an LXQt developer. Two of those reasons were that LXQt wanted to remain extremely modular and didn't like "branding".

KDE was very modular before. Now, it's losing its modularity little by little. I hope KDE developers see how bad that could be and reverse it. Gnome3 and modularity? It's a joke.

As for "branding", everyone seems to love it. I was happy when I didn't see it in LXQt.

varlesh commented 4 years ago

I'm not trying to convince you. The thing is that this is a hardcode style. You previously said about banning use of hardcoded styles in QML on Qt. But now approve hardcoded icons. It's very strange position. Please see how looking FeatherPad (compared with JuffEd): image Yes some icons hardcoded (it's possible way), but not all. And this icons not fit with thisicon themes. But how it's looking with Noveau, KFaenza or Oxygen?

tsujan commented 4 years ago

But now approve hardcoded icons.

I don't approve of hard-coded icons -- I kept system icons as far as I could. What I did had practical reasons and was a result of the current discrepancy between KDE and Gnome — it wasn't based on my aesthetic feelings or tastes. Some of those reasons:

  1. I told you about KDE's auto-mnemonics above (at last, they may have accepted that it was a bad idea but I can't rely on their decisions).
  2. FeatherPad's GUI is compact and doesn't tolerate long texts on buttons.
  3. SVG symbolic icons with stylesheet are only supported by KDE and LXQt, while I've included an icon engine in FeatherPad that supports them in all desktop environments.
  4. Unlike colored icons, black or white symbolic icons can seem like special fonts.
  5. I don't want my codes be cluttered because Gnome and KDE devs can't come to an agreement on icon names.

I didn't make up the above points just now. While developing FeatherPad, I really encountered problems and solved them, once for all, by adding an icon engine to the code as well as symbolic SVG icons.

Based on my long coding experience, I think that's the best practice with Qt apps that have special icons and are supposed to work everywhere. LXQt apps aren't among them (they work everywhere but don't need special icons).

varlesh commented 4 years ago

You developer - you right!

tsujan commented 4 years ago

BTW, in your screenshot, you haven't enabled FeatherPad's dark scheme: Preferences → Text → Dark color scheme:

dark_scheme

tsujan commented 2 years ago

Perhaps it can be done without problem only for tool-bar and menus. The option can be like, "Use system icons where possible", and it can be unchecked by default.

Reopening...

varlesh commented 2 years ago

Thx ;) Good news

tsujan commented 2 years ago

I was reviewing closed issues in Kvantum and FeatherPad and found two, that could be handled differently. This was one of them (that of Kvantum was related to QML tool-buttons in systemsettings5, for which I added a workaround in git).

tsujan commented 2 years ago

Done in https://github.com/tsujan/FeatherPad/commit/3492b33a5944bfdb3cdc1b0bf8c594d2f046a388

varlesh commented 2 years ago

Thank you )

tsujan commented 2 years ago

You're very welcome.