-
Notifications
You must be signed in to change notification settings - Fork 879
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
Rewards button icon pre-opt-in gets correct scaling #3830
Conversation
d15a6b6
to
9ac1430
Compare
0fbbb9d
to
e3f343a
Compare
@mkarolin thanks for spotting the lack of includes. Have amended here https://github.com/brave/brave-core/compare/0fbbb9dfef5be5195aaec209a3c37a2e7b5ad602..e3f343af79a871990abba6cedc2d818a2392be66 |
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 works on Windows debug build 👍 |
I'm not sure this is related with this PR but crash happened when I click rewards button.
|
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.
Confirmed on linux (ubuntu) and Win10 that rewards icon is displayed with proper scaling.
I can see crash on linux when rewards button is clicked, but it seems another issue.
Thanks @simonhong , I'll check out the crash |
FYI @simonhong 's crash was caused by setting the "Extensions Toolbar Menu" flag to true. That is a known issue and the flag is disabled by default. |
Rewards button icon pre-opt-in gets correct scaling
Rewards button icon pre-opt-in gets correct scaling
Uplift to 0.72.x: Rewards button icon pre-opt-in gets correct scaling (#3830)
Uplift to 0.71.x: Rewards button icon pre-opt-in gets correct scaling (#3830)
Sets the scale of the image compared to the size we want to display it, so that the underlying Draw function can work out if the image needs to be re-sized or not. Previously this was only happening (coincidentally) when the display was not using a scaling factor of
1
since this would not match the default scaling factor of thegfx::Image
. Resize is done here: https://github.com/chromium/chromium/blob/0aa1854a269704ce0dd45641cfb9d440666e54bc/chrome/browser/ui/extensions/icon_with_badge_image_source.cc#L147-L148Fix: brave/brave-browser#6663
This should be uplifted to wherever #3698 is uplifted to (currently 0.71.x).
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
On brave/brave-browser#6663
Reviewer Checklist:
After-merge Checklist:
changes has landed on.