-
Notifications
You must be signed in to change notification settings - Fork 904
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
Toolbar Styles #391
Toolbar Styles #391
Conversation
902ead5
to
9688cd5
Compare
@bbondy @simonhong This is ready to begin review. I've updated the description and created follow-up issues, but I think this is a nice start. I'm doing a final cross-platform manual test now too. |
9688cd5
to
ce91af0
Compare
|
||
class BraveNewTabButton : public NewTabButton { | ||
public: | ||
using NewTabButton::NewTabButton; |
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.
nit: This can be removed.
#include "ui/views/view.h" | ||
#include "ui/views/widget/widget_observer.h" | ||
|
||
+class BraveNewTabButton; |
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.
nit: This can be removed
@@ -6,15 +6,18 @@ | |||
|
|||
#include <string> | |||
|
|||
|
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.
nit: new line
|
||
} | ||
|
||
const SkColor kPrivateLocationBarBackground = SkColorSetRGB(0x1b, 0x0e, 0x2c); |
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.
How about moving this constant to anonymous namespace?
} | ||
|
||
template <class T> | ||
constexpr T DarkPrivateLight(OmniboxTint tint, |
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 template is needed? I found that only SkColor is used as template argument.
ff8f664
to
0208911
Compare
All feedback is now addressed - thanks @simonhong |
0208911
to
8b0e83f
Compare
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
8b0e83f
to
73706ff
Compare
Fallback dark and private themes to chromium incognito theme
Extend OmniboxTint to accept Private as well as Light and Dark
Note that the static LocationBarView::IsRounded is a misnomer since it controls function (i.e. "Should Omnibox Wrap LocationBar"), and not just the shape. Similarly, NewTabButton confusingly uses border radius to infer Button width, so some workarounds need to be employed to use content bounds width instead. Tab height is also reduced in order to match a smaller border radius, otherwise there is too much visual empty surface area.
73706ff
to
966b6d5
Compare
0.55.x 2d32614 |
update topsite tile click area
Fix brave/brave-browser#670 (needs follow-up for light theme at brave/brave-browser#961)
Fix brave/brave-browser#785
Fix brave/brave-browser#787 (needs follow-up for bottom corner via brave/brave-browser#962)
Fix brave/brave-browser#786
Architecture:
layout_constants
overrideomnibox_theme
overridePatching
Many things are tied to the static function
LocationBarView::IsRounded()
. Unfortunately, we want this to returnfalse
in some circumstances (e.g. drawing the border and the background), and not in others (e.g. drawing the omnibox popup).Therefore, this PR adds a new static function:
LocationBarView::ShouldOmniboxSurround()
.We can't use a chromium_src override for omnibox_popup_contents_view.cc to define
IsRounded
asShouldOmniboxSurround
, since this includes the LocationBarView header file. We also need some, but not all calls from LocationBarView members to change which static function is called, so patching is the only method I've found so far...TODO
More color and shape refinements<-- Subsequent PRSubmitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: