Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi icon pack support 🐱 #23

Closed
wants to merge 13 commits into from
Closed

Conversation

JAFB321
Copy link

@JAFB321 JAFB321 commented Feb 3, 2022

Features:

  • Ability to select more icon packs from the extension settings
  • Multi image extension support
  • Change the animation speed for each icon pack (from code)

Now you can go to the settings and select the pack in the combobox:
image
image

I don't have more cool icons, I just added a dancing parrot and funny walking chicken. But this changes make us able to add more icon packs in a easy way.

How to add more icon packs

  1. Add icons files (same folder structure):

image

  1. Prefs - Add it to settings
    image
    image

3.- Then add the IconProvider preset
image
The getIconProvider function return an instance of IconProvider with the preset of each icon pack.
Note that the IconProvider class now has the following params:

  • name: name of the icon pack
  • ext: icons files extension
  • spritesCount
  • speed: is for adjust animation speed (default: 1)

Enjoy!

Any feedback is welcome, I like your project and I can contribute to add more features if you want ! :)

@win0err
Copy link
Owner

win0err commented Feb 15, 2022

Hello, @JAFB321! Thanks for awesome PR!
The feature you introduced is really cool!

I want to mention the following things:

  1. Image format
    GIF is a really terrible format. It doesn't support partial (alpha-channel) transparency. These artifacts look awful on white or transparent top bars. PNG is better, but it's not scalable. I'm not sure that PNGs will look nice on 4k/5k monitors.

    Let's use SVGs. It's a standard for graphics in Linux (especially on GNOME Shell's top bar).
    We can draw an SVGs with Party Parrot, but chicken GIF should be removed, sorry.

  2. Licence
    We need to have CC-licensed images to be freely published on EOG, repositories, etc.

    About Party Carrot:
    I found a repo with some source code. For example, parrot.svg is licensed under Creative Commons. Link for inspiration: https://codepen.io/nathangath/pen/RgvzVY/. We need to draw/create all missing states. I can help you with this activity.

    Another suggestion is the following: I think that it would be better if the parrot will be filled with #bebebe color. It's another standard of GNOME top bar icons.

  3. Speed
    I mentioned that you have introduced a new coefficient runnerSpeedCoef in formula:
    y = 5000/sqrt(x+30) * runnerSpeedCoef - 400
    I want to mention that runnerSpeedCoef could be automatically calculated.

    I suggest the following configuration:
    runnerSpeedCoef = 5 / spritesCount
    y = (5000/sqrt(x+30) - 400) * runnerSpeedCoef.

    It will give us the same time limit for playing all sprites. For example, when x (CPU utilization) is 5:
    spritesCount = 10: y = 222.577127364,
    spritesCount = 5: y = 445.154254729, etc.

P.S. I've created a branch called feature/different-runners. Could you send this PR to the feature/different-runners, not master branch? Thanks!

@JAFB321
Copy link
Author

JAFB321 commented Feb 15, 2022

Hi @win0err Thank you very much for the feedback!
I'll work on that soon and make a PR to feature/different-runners branch 👍🏻

@win0err
Copy link
Owner

win0err commented Feb 15, 2022

Hi @win0err Thank you very much for the feedback! I'll work on that soon and make a PR to feature/different-runners branch 👍🏻

Thank you! If you have any questions — feel free to ask!

This was referenced Oct 26, 2022
@win0err
Copy link
Owner

win0err commented Oct 31, 2022

Already implemented in #33; fell free to add new runners in different PRs

@win0err win0err closed this Oct 31, 2022
@evanslify
Copy link

Seems like the functionalities exists only in feature/v22 branch instead of master?

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.

3 participants