PapirusDevelopmentTeam / papirus-icon-theme

Pixel perfect icon theme for Linux
https://git.io/papirus-icon-theme
GNU General Public License v3.0
6.46k stars 409 forks source link

[Icon request] Mozc-specific icons #2970

Closed openmindead closed 2 years ago

openmindead commented 2 years ago

Hi folks,

https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/issues/1271#issuecomment-423416841 The work done by @SmartFinn is awesome but there's one more input method which icons are missing, and that's Mozc. When using Papirus icon theme in Plasma, fcitx icons for mozc are all the same, just a generic keyboard icon. What I'm talking about is the following icons: mozc-alpha_full mozc-alpha_half mozc-dictionary mozc-direct mozc-hiragana mozc-katakana_full mozc-katakana_half mozc-properties mozc-tool mozc

Just a sidenote, when Breeze icon theme is applied, native Mozc icons are used by Plasma's kimpanel applet, but Papirus somehow overrides them with its own icon. Is it possible to prevent this and use native icons provided by Mozc like Breeze theme allows that? For now I just have to use an ugly trick as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
    width="48" height="48">
  <text x="25" y="40" style="font-family:Noto Sans, 'Noto Sans CJK JP', serif; font-size: 48px; text-anchor:middle;">あ</text>
</svg>
Anuj230977 commented 2 years ago

Ok

varlesh commented 2 years ago

If you switch plasma theme to Breeze, but with Papirus icons, it's worked for you? I mean, on Breeze plasma theme available built-in fcitx icons image

openmindead commented 2 years ago

Hi Alexey, no those icons you referred to are of fcitx and its input (sub)methods like fcitx-anthy, fcitx-hangul, fcitx-kkc, fcitx-unikey, etc. But fcitx-mozc -specific icons are not present. The only way to see Mozc icons is to use Breeze / Adwaita icon themes. I haven't tested with many custom themes as I prefer only Papirus, but I tried with Flat-Remix-Blue which I happened to have and there I observe a similar issue as with Papirus - all icons are substituted with generic input icon: Screenshot_20220202_202949 Screenshot_20220202_203057 Screenshot_20220202_203143

And here is what I have now with the trick I described above (Papirus + some symlinks and custom SGVs): Screenshot_20220202_203407 But I'd like to see native Mozc PNGs or Papirus-styled icons, if possible.

To answer your question precisely: no, those icons are still missing if using Breeze Plasma theme with Papirus icon theme.

varlesh commented 2 years ago

@openmindead tray svg icons added, please test it. If it's not applied, we can fix that with hardcode-tray tool. on archlinux it's located on /usr/share/fcitx/mozc/icon/ Also on DEB also locted DNS icons names, like as org.fcitx.Fcitx5.fcitx-mozc-alpha-full.png, but i don't know this used or not.

varlesh commented 2 years ago

https://packages.ubuntu.com/impish/all/fcitx-mozc-data/filelist

openmindead commented 2 years ago

Good day @varlesh and thank you for your work, icons look very nice already. Much nicer than what I could make myself.

It didn't work at first, however. Then I tried to rename all icons from mozc-katakana_full-like to fcitx-mozc-katakana-full-ish scheme and it worked: Screenshot_20220203_210342 Screenshot_20220203_210726 Screenshot_20220203_210815 In short, my changes were: prepend fcitx- for all mozc icons and substitute underscores with hyphens. I think that is the way to go. Note that there's an orange Mozc icon on the 2nd and the 3rd screenshot. That's because I also renamed the icon from apps folder named just mozc.svg using the same approach, it had already existed in Papirus for quite some time. And there's a symlink to it, mozc-setup.svg, which is responsible for displaying Mozc icon here: Screenshot_20220203_211653 So to sum it up: renaming your icons as mentioned above + renaming already existing icons worked. The only drawback now is that old icons are orange, and these new icons are black/white/grey.

Ah, btw, if you doubt on renaming practise: I've searched through Papirus folders and found out that many of input methods that have their icons already specified do have some prefix like ibus- in ibus-setup-hangul or ibus-anthy, etc. So this won't be something unique to Mozc if you proceed with renaming according to my suggestion. In case of hesitation, you can try creating a bunch of symlinks to your original files with "my" names though. The only real quirk here seems to be using hyphens instead of underscores. And deciding what to do with the previously created orange icon - redesign it or not? - should be thought out, too.

The testing was performed on Manjaro Linux with stock (built by Arch maintainers) versions of fcitx5 5.0.13-1 (note, fcitx5, not regular fcitx) and fcitx5-mozc 2.26.4360.102.gca82d39-1 (which is marked as out-of-date since it was built in May 2021 but it is what it is) with the following list of icons inside: pacman -Ql fcitx5-mozc |grep png

fcitx5-mozc /usr/share/icons/hicolor/128x128/apps/fcitx-mozc.png fcitx5-mozc /usr/share/icons/hicolor/128x128/apps/org.fcitx.Fcitx5.fcitx-mozc.png fcitx5-mozc /usr/share/icons/hicolor/32x32/apps/fcitx-mozc.png fcitx5-mozc /usr/share/icons/hicolor/32x32/apps/org.fcitx.Fcitx5.fcitx-mozc.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-alpha-full.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-alpha-half.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-dictionary.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-direct.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-hiragana.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-katakana-full.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-katakana-half.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-properties.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/fcitx-mozc-tool.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-alpha-full.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-alpha-half.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-dictionary.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-direct.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-hiragana.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-katakana-full.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-katakana-half.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-properties.png fcitx5-mozc /usr/share/icons/hicolor/48x48/apps/org.fcitx.Fcitx5.fcitx-mozc-tool.png

Where all icons beginning with org.fcitx... are real images and all that named like fcitx-mozc... are just symlinks.

Btw icons look very nice in tray menus but a bit weird on a thick Latte dock.

varlesh commented 2 years ago

Thank you for your meticulous and interesting research! I think, "Orange" mozc icon can be fixed on plasma theme (Materia for example).

Btw icons look very nice in tray menus but a bit weird on a thick Latte dock.

If you mean panel used as Latte panel (or Plasmashell, it does not matter). On Plasma used 22px icon size for tray and this icons available (16px and 24px too). We can't fix the blur or icon size... it's Mozc icons size.

Where all icons beginning with org.fcitx... are real images and all that named like fcitx-mozc... are just symlinks.

But i'm not understand, this used or not?

Rename icons, it's not problem

openmindead commented 2 years ago

I think, "Orange" mozc icon can be fixed on plasma theme (Materia for example)

Changing Plasma theme to Breeze has no impact on Mozc main icon (same for other Mozc icons like hiragana, dictionary, etc): Screenshot_20220203_222054 See how current stock name ~/.local/share/icons/Papirus/16x16/mozc{-setup}.svg affects Plasma input method panel? That's a Breeze Plasma theme + Papirus icons. Other icons on that screenshot are fine since I was too lazy to rename them all back. Only changing icon theme or editing filenames has its effect as I posted above.

The second screenshot showcases fcitx own tray applet which is looking nice, really: Screenshot_20220203_222618 Note, again Breeze Plasma theme, Papirus icons with stock mozc.svg icon fallbacks to some generic input icon. Btw look at how it displays icons of English and Russian keyboard layouts (not complex input methods, just layouts added as input methods in fcitx settings, another screenshot follows): Screenshot_20220203_223419 Screenshot_20220203_223438 I wish there would be a way to make Input method panel display keyboard layouts' icons. That's another story though. Moving on.

What I meant regarding Latte is shown on the following shots: Screenshot_20220203_225349 Screenshot_20220203_225423

This is not about menus, this is about semi-transparent and blurred dock with black icon on it, the 2nd one specifically (it's Japanese "A", sounds exactly like Russian "a"). Others also look no any better: Screenshot_20220203_231601 Screenshot_20220203_231633 Screenshot_20220203_231658

I believe it's due to them being "drawn" with transparent lines and desktop background messes with them. Frankly, this was my main reason why I would have preferred just orange styled fully opaque icons as I wrote initially, but that's OK if you stick to this black/white version anyway. I'm just informing that such icons do not fit all scenarios. Note though that menus' icons are fine. Ah, one more thing: this Latte instance is just a dock, not a panel mode. I used to have Plasma input panel on it due to its bigger size so that input method icons are faster and better recognizable. Just an idea: maybe make their lines thicker? I mean panel icons A, あ, ア, ア. When I look at these icons, I feel like their background (black square) could be bigger, and their glyph lines could be thicker. Similar to that orange icon, but not THAT thick :)

this used or not?

They are actually used when Breeze icon theme is applied. They are real Mozc stock icons that have their respective links named fcitx-mozc-hiragana.png, etc, which we now have figured how to make use of in Papirus.

varlesh commented 2 years ago

Just an idea: maybe make their lines thicker? I mean panel icons A, あ, ア, ア. When I look at these icons, I feel like their background (black square) could be bigger, and their glyph lines could be thicker. Similar to that orange icon, but not THAT thick :)

Latte use shadow background for all icons, and transparency icons can be not good visible. I don't want change style this icons, because all fcitx (tray) icons have single style. Icons renamed