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

Show the rainbow donate button in some cases (1/6 ratio) #3846

Merged
merged 1 commit into from May 8, 2021

Conversation

daschuer
Copy link
Member

@daschuer daschuer commented May 8, 2021

for a little bit of surprise ...

@github-actions github-actions bot added the ui label May 8, 2021

if (!Color::isDimColor(palette().text().color())) {
btnDonate->setIcon(QIcon(":/images/heart_icon_light.svg"));
if (std::rand() % 6) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't 1/6 chance, this is 1/RAND_MAX chance, or did I miss something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, mod 6 should work. I was confused ;-)

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ronso0 any comments?

</g>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="svg4023" width="32" height="32" version="1.1" viewBox="0 -256 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink">
<metadata id="metadata4027">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you save this as an optimized SVG from Inkscape? This brings down file size.

@ronso0
Copy link
Member

ronso0 commented May 8, 2021

double-check the SVG after optimizing, it's not 100% reliable

@uklotzde uklotzde added this to the 2.3.0 milestone May 8, 2021
@daschuer
Copy link
Member Author

daschuer commented May 8, 2021

OK, I have stripped the svg a bit more.

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@ronso0 ronso0 merged commit a75a0e7 into mixxxdj:2.3 May 8, 2021
@daschuer daschuer deleted the rand_donate branch August 1, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants