-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
|
||
if (!Color::isDimColor(palette().text().color())) { | ||
btnDonate->setIcon(QIcon(":/images/heart_icon_light.svg")); | ||
if (std::rand() % 6) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ronso0 any comments?
res/images/heart_icon_rainbow.svg
Outdated
</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"> |
There was a problem hiding this comment.
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.
double-check the SVG after optimizing, it's not 100% reliable |
OK, I have stripped the svg a bit more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
for a little bit of surprise ...