bikass / kora

Kora icon theme for GNU/Linux os
GNU General Public License v3.0
660 stars 31 forks source link

[Budgie Desktop] Some tray icons bigger than others #100

Closed algent-al closed 3 years ago

algent-al commented 3 years ago

panel-icons-bug

A few icons are bigger than others. This is for dropbox, telegram and wireless so far.

bikass commented 3 years ago

Oh, yes seems like just Budgie has this problem... Well we need to find some way batch resize icons. To do it manually would be near to impossible. Maybe Inkscape has some command line options? Could you look into it?

bikass commented 3 years ago

Also we need to keep code of files. Changing 16 to 22 unfortunately doesn't work. Found this, but can't get it working: https://github.com/numixproject/numix-tools/blob/master/numix-tools/svgscale

algent-al commented 3 years ago

I tried to modify /kora/panel/16/dropboxstatus-idle.svg with inkscape by increasing the image borders to 22x22px and keeping the dropbox image at 16x16. kora-korla Solus budgie panel needs icons at 22x22 px. If the svg file is 16x16 px, it will stretch to 22x22. Or maybe I am wrong.

bikass commented 3 years ago

Yes, it worked when there were folders with different sizes. Did you tried that script I posted before? Don't understand how it works, I'm just getting errors.

algent-al commented 3 years ago

Did you tried that script I posted before? Don't understand how it works, I'm just getting errors.

It is working! Remember I use Solus. Install librsvg-devel then save that script with the name svgscale, to your local bin folder ~/.bin/ and set it as executable. Then inside folder 16 just run svgscale 22 to create the folder 22 with svg images at 22x22 pixels.

bikass commented 3 years ago

:) that would have been cool if it worked. There is no librsvg-devel package on popOS, just librsvg2-bin. So I placed svgcale.sh script to ./bin in home directory, made it executable. Getting - 'svgscale: command not found'

algent-al commented 3 years ago

What do you get with echo $PATH?

bikass commented 3 years ago

I instaled librsvg2-dev , still no luck. ./bin folder was not present I created it

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

algent-al commented 3 years ago

If you don't see /home/username/.bin then edit your .bashrc file by adding these lines.

## set PATH so it includes user's private .bin
if [ -d "$HOME/.bin" ] ; then
PATH="$HOME/.bin:$PATH"
fi
algent-al commented 3 years ago

Don't forget to reset bash, just by running bash or close and re-open terminal.

bikass commented 3 years ago

Well I guess I'm just too dumb for that :) . Can this script run like this 'bash svgscale.sh 22' - getting syntax errors. And the way you do - just 'command not found'

algent-al commented 3 years ago

'bash svgscale.sh 22'

Did you save the script as svgscale or as svgsclae.sh? what does echo $PATH give you now? Did you close and re-open terminal?

bikass commented 3 years ago

saved as svgscale.sh

/home/oo/.bin:/home/oo/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Yes, I reopened terminal.

algent-al commented 3 years ago

If you have saved it as svgscale.sh then the command should be svgscale.sh 22 inside the folder with the SVG images.

algent-al commented 3 years ago

If you fail to do that, that I think you have to copy the svgscale.sh script to the folder you want to convert the SVG files, and then run bash svgscale.sh 22 or sh svgscale.sh 22.

bikass commented 3 years ago

ok, now I'm getting different error: bash: /home/oo/.bin/svgscale.sh: /bin/bash^M: bad interpreter: No such file or directory

bikass commented 3 years ago

and if I run with script in directory: : ambiguous redirect 1 svgscale.sh: line 7: syntax error near unexpected token elif' 'vgscale.sh: line 7:elif [[ -z "$size" ]]; then

algent-al commented 3 years ago

I don't know these stuff. A quick search found this :https://askubuntu.com/questions/304999/not-able-to-execute-a-sh-file-bin-bashm-bad-interpreter

You second option is to come back to solus :P (or use a VM)

bikass commented 3 years ago

Ok, :) it worked. Looks like the way I created .sh file was wrong way. Now I made it from terminal and it worked. Thank you a lot for help!!! By the way, I made all action icons too, so now theme is independent!

algent-al commented 3 years ago

That is cool. Looking forward for the next release.

Digitalone1 commented 3 years ago

@bikass If you have to do lots of substitutions inside the svg text files you can use search and replace feature of atom editor.

If you're not able to do it, open an issue and tag me, I'll see what I can do. Sometimes it's impossible, but in other cases it's easy and fast, I changed color codes on over 1k files with it in few seconds.

bikass commented 3 years ago

:) ok, so that is how I was struggling: This is icons how they need to be changed. A is how it needs to look, B How they look after editing. Icons.zip I used these scripts for clean-up, but they not fully worked, so I somehow slapped additional script 'replace.sh'. SVG_cleanup.zip Workflow is: after editing I run 'ffsvg.sh', then 'replace.sh', then in each file manually adding top lines above <path style="fill:current color" Class="ColorSheme-Text"...... You will see this code in action-unavailable_A.svg. I guess these lines could have been changed in atom? Of course ideally would be nice to fix everything in scripts. So that's how I did almost 1500 icons :D

Digitalone1 commented 3 years ago

If I understood correctly, you need to add the following:

<defs>
  <style id="current-color-scheme" type="text/css">
   .ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; } .ColorScheme-NeutralText { color:#ff9800; } .ColorScheme-PositiveText { color:#4caf50; } .ColorScheme-NegativeText { color:#f44336; }
  </style>
 </defs>

Before the path tag.

But maybe a svg file can have multiple path tags, so you need to place it just under the opening svg tag?

Like this:

<svg ......>
 <defs>
  <style id="current-color-scheme" type="text/css">
   .ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; } .ColorScheme-NeutralText { color:#ff9800; } .ColorScheme-PositiveText { color:#4caf50; } .ColorScheme-NegativeText { color:#f44336; }
  </style>
 </defs>
<path ...... />
<path ...... />
<path ...... />
</svg>
bikass commented 3 years ago

This is icon after clean-up. You'll see difference with A icon action-unavailable_C.zip

Digitalone1 commented 3 years ago

You didn't answered me and if you don't I cant understand what you really need.

bikass commented 3 years ago

I provided info as clearly as I could. Anyway, all icons are done. So all is good.

algent-al commented 3 years ago

I tried by compiling the theme using last commit and the issue isn't fixed.

bikass commented 3 years ago

Some icons are still bigger on panel, or because of renaming icon theme?

algent-al commented 3 years ago

There was no change. I installed it as a new package.

bikass commented 3 years ago

Did you tried update icon cache and relogin/restart? There was one icon that did not changed for me, just after restarting everything was fine.

algent-al commented 3 years ago

Did you tried update icon cache and relogin/restart? There was one icon that did not changed for me, just after restarting everything was fine.

Yes still same. kora

bikass commented 3 years ago

All that work to making different sizes :) .... Maybe it has something to do with index files, I have no idea what is the problem.

bikass commented 3 years ago

So resizing didn't worked. If you look at icons code in 16 and 22 they are different.

bikass commented 3 years ago

This resizing process also changed colours from hex to rgb. So, previous cleanup process doesn't work.

algent-al commented 3 years ago

It appears that the problem is with 24px icons. Initially i thought it was 22px. Just did a test, by copying the old panel/24 folder from korla, and replaced the panel/24 of kora. Now tray icons look fine.

algent-al commented 3 years ago

Here you can see the old 24px icons: (Dropbox icons for example) old 24 and here the new 24px icons: new 24

The image in the old 24x24 icons is around 18px. Only the borders are 24x24

bikass commented 3 years ago

Can you replace this icon in 24 and see if it works network-wired.zip

algent-al commented 3 years ago

This is with your icon: bikass

After edited a bit the icon inside using inkscape. algent

bikass commented 3 years ago

Ok so that means 22 also has effect. Could you try replacing 22, and 24 and relogin. Problem is not in proportions I checked, it's in code. network-wired22.zip

algent-al commented 3 years ago

Could you try replacing 22, and 24 and relogin

You mean the new 22 icon in the 22 folder, and your new 24 icon in 24 folder. Your new 22 icon it is the same with the existing one in the 22 folder. I don't see any change.

bikass commented 3 years ago

You right, I checked in papirus. An icons are of different proportions

bikass commented 3 years ago

I tried to change code. I thought that mess in code has something to do with it. But looks like icons supposed to be of different proportions. Is there any guidelines for that?

algent-al commented 3 years ago

In the old panel/24 folder, there are 2026 files in total, 1100 symlinks and 926 icons. So doing it manually it will take a while. I don't know about any script that will do this automatically.

bikass commented 3 years ago

It's 479 icons I'm changing. So, manually 2x479 to change. .... Well I did over 1000 icons in actions :) I guess, I already used to run these kind of marathons.

bikass commented 3 years ago

Ok, now I'm little bit confused. I checked Breeze and Suru++ icons - they don't even have scutch thing as 'panel' icons. Do we even need those panel icons?

algent-al commented 3 years ago

You are wrong there are panel/16,22 and 24 icons in Suru++.

bikass commented 3 years ago

Yea I'm wrong, and they using Papirus icons. But Breeze doesn't have.

algent-al commented 3 years ago

Are you refering to this: https://github.com/KDE/breeze-icons/tree/master/icons Breeze is for KDE, our problem is for Budgie DE.

bikass commented 3 years ago

I think my head stopped working few hours ago, lets leave it for another time. I have no idea where I got this Suru++ theme but it doesn't have 'panel' icons. And they work. Well on gnome kora works too, just budgie... Screenshot from 2021-01-08 23-28-34

Digitalone1 commented 3 years ago

I'm quite good with regular expressions, so I can write scripts to change strings or help to change them in atom editor with search and replace feature.

But you should tell me the exact string to change and the modification to apply. I want to contribute when I have time, but if you tell me look at the file A and I want the file B, I won't be of any help.