* [AI Chat] Move HandoffButton lower and make it smaller Brave's URL bar is centered, so it makes the URL unreadable in more cases than upstream. And Brave's AI Chat conversation UI has large buttons for pausing the tasks, which perform the same function. - Fix https://github.com/brave/brave-browser/issues/51384
48 lines
2.4 KiB
Diff
48 lines
2.4 KiB
Diff
diff --git a/chrome/browser/actor/ui/handoff_button_controller.cc b/chrome/browser/actor/ui/handoff_button_controller.cc
|
|
index f7efc4d9584c9c9cd3087d5f5452b0f14268f82f..9b6f882398472d0fe6891f582e92054b232f066c 100644
|
|
--- a/chrome/browser/actor/ui/handoff_button_controller.cc
|
|
+++ b/chrome/browser/actor/ui/handoff_button_controller.cc
|
|
@@ -58,7 +58,7 @@ constexpr float kBackgroundInset = 2.0f;
|
|
constexpr float kHandoffButtonCornerRadius = 48.0f;
|
|
constexpr int kHandoffButtonIconSize = 20;
|
|
constexpr gfx::Insets kHandoffButtonContentPadding =
|
|
- gfx::Insets::TLBR(10, 10, 10, 14);
|
|
+ gfx::Insets::TLBR(4, 6, 4, 10);
|
|
|
|
// A customized LabelButton that shows a hand cursor on hover.
|
|
class HandoffLabelButton : public views::LabelButton {
|
|
@@ -118,18 +118,12 @@ class GradientBubbleFrameView : public views::BubbleFrameView {
|
|
shadow_flags.setAntiAlias(true);
|
|
SkPoint center = SkPoint::Make(button_bounds_f.CenterPoint().x(),
|
|
button_bounds_f.CenterPoint().y());
|
|
- std::vector<SkColor> colors;
|
|
- if (base::FeatureList::IsEnabled(features::kActorUiThemed)) {
|
|
- SkColor primary_color =
|
|
- GetColorProvider()->GetColor(kColorActorUiHandoffButtonBorder);
|
|
- colors = {primary_color, primary_color, primary_color, primary_color};
|
|
- } else {
|
|
- colors = {SkColorSetARGB(255, 79, 161, 255),
|
|
- SkColorSetARGB(255, 79, 161, 255),
|
|
- SkColorSetARGB(255, 52, 107, 241),
|
|
- SkColorSetARGB(255, 52, 107, 241)};
|
|
- }
|
|
- const SkScalar pos[] = {0.0f, 0.4f, 0.6f, 1.0f};
|
|
+ std::vector<SkColor> colors = {
|
|
+ SkColorSetARGB(255, 250, 114, 80),
|
|
+ SkColorSetARGB(255, 255, 24, 147),
|
|
+ SkColorSetARGB(255, 167, 138, 255),
|
|
+ };
|
|
+ const SkScalar pos[] = {0.0f, 0.5f, 1.0f};
|
|
std::vector<SkColor4f> color4fs;
|
|
for (const auto& color : colors) {
|
|
color4fs.push_back(SkColor4f::FromColor(color));
|
|
@@ -382,7 +376,7 @@ gfx::Rect HandoffButtonController::GetHandoffButtonBounds() {
|
|
// Position with a fixed offset from the top of the anchor.
|
|
: anchor_bounds.y() - kHandoffButtonTopOffset;
|
|
|
|
- return gfx::Rect({x, y}, preferred_size);
|
|
+ return gfx::Rect({x, y + (is_tab_strip_visible ? kHandoffButtonPreferredHeight / 3 : 0)}, preferred_size);
|
|
}
|
|
|
|
void HandoffButtonController::OnWidgetDestroying(
|