mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1b511b12c | |||
| 5cd4d9e585 | |||
| dfd4885224 | |||
| 84e0fdbde7 | |||
| 6e6809a053 |
@@ -1,21 +0,0 @@
|
||||
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
@@ -60,8 +60,7 @@ SelectedKeywordView::GetKeywordLabelName
|
||||
names.full_name =
|
||||
l10n_util::GetStringUTF16(IDS_STARTER_PACK_PAGE_KEYWORD_TEXT);
|
||||
} else {
|
||||
- names.full_name = l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD,
|
||||
- names.short_name);
|
||||
+ names.full_name = names.short_name;
|
||||
}
|
||||
}
|
||||
return names;
|
||||
@@ -194,7 +193,7 @@ const std::u16string& SelectedKeywordVie
|
||||
|
||||
int SelectedKeywordView::GetExtraInternalSpacing() const {
|
||||
// Align the label text with the suggestion text.
|
||||
- return 14;
|
||||
+ return 3;
|
||||
}
|
||||
|
||||
void SelectedKeywordView::SetLabelForCurrentWidth() {
|
||||
@@ -162,11 +162,10 @@
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/accessibility/ax_enums.mojom.h"
|
||||
@@ -115,6 +116,15 @@ void SelectedKeywordView::SetCustomImage
|
||||
if (template_url &&
|
||||
@@ -118,6 +119,14 @@ void SelectedKeywordView::SetCustomImage
|
||||
template_url->starter_pack_id() == TemplateURLStarterPackData::kGemini) {
|
||||
vector_icon = &omnibox::kSparkIcon;
|
||||
+
|
||||
|
||||
+ } else if (template_url && template_url->bang_id() > 0) {
|
||||
+ switch (bang_manager_->GetCategoryForBang(template_url->bang_id())) {
|
||||
+ case Bangs::BANG_CATEGORY_AI:
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
// Otherwise, if in keyword mode, adjust indentation to align the icon and
|
||||
// the text with the suggestion icons & texts.
|
||||
- icon_left += 9; /*icon_indent_keyword_mode*/
|
||||
+ icon_left += 3; /*icon_indent_keyword_mode*/
|
||||
+ icon_left += 0; /*icon_indent_keyword_mode*/
|
||||
icon_left += omnibox_feature_configs::AdjustOmniboxIndent()
|
||||
.Get()
|
||||
.input_icon_indent_offset;
|
||||
@@ -9,17 +9,45 @@
|
||||
|
||||
#if !defined(USE_AURA)
|
||||
|
||||
@@ -232,8 +232,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
@@ -162,7 +162,9 @@ class TopBackgroundView : public views::
|
||||
// not antialiased, since the goal is to completely cover the underlying
|
||||
// pixels, and AA would let those on the edge partly bleed through.
|
||||
SetBackground(location_bar_->CreateRoundRectBackground(
|
||||
- SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc, false));
|
||||
+ SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc,
|
||||
+ /*antialias=*/false,
|
||||
+ /*should_border_scale=*/true));
|
||||
}
|
||||
|
||||
#if !defined(USE_AURA)
|
||||
@@ -215,7 +217,7 @@ END_METADATA
|
||||
// Insets used to position |contents_| within |contents_host_|.
|
||||
gfx::Insets GetContentInsets() {
|
||||
return gfx::Insets::TLBR(
|
||||
- RoundedOmniboxResultsFrame::GetNonResultSectionHeight(), 0, 0, 0);
|
||||
+ RoundedOmniboxResultsFrame::GetNonResultSectionHeight() - 4, 0, 0, 0);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -232,8 +234,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
contents_host_->layer()->SetFillsBoundsOpaquely(false);
|
||||
|
||||
// Use rounded corners.
|
||||
- const int corner_radius = views::LayoutProvider::Get()->GetCornerRadiusMetric(
|
||||
- views::ShapeContextTokens::kOmniboxExpandedRadius);
|
||||
+ const int corner_radius = 12.0f;
|
||||
+ const int corner_radius = 12;
|
||||
contents_host_->layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(corner_radius));
|
||||
contents_host_->layer()->SetIsFastRoundedCorner(true);
|
||||
@@ -284,10 +283,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
|
||||
@@ -248,6 +249,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
views::BubbleBorder::Shadow::STANDARD_SHADOW);
|
||||
border->set_rounded_corners(gfx::RoundedCornersF(corner_radius));
|
||||
border->set_md_shadow_elevation(kElevation);
|
||||
+ border->set_draw_border_stroke(true);
|
||||
SetBorder(std::move(border));
|
||||
|
||||
AddChildViewRaw(contents_host_.get());
|
||||
@@ -284,10 +286,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
|
||||
|
||||
// static
|
||||
gfx::Insets RoundedOmniboxResultsFrame::GetLocationBarAlignmentInsets() {
|
||||
@@ -28,21 +56,12 @@
|
||||
return gfx::Insets::TLBR(6, 1, 5, 1);
|
||||
}
|
||||
- return gfx::Insets::VH(5, 6);
|
||||
+ return gfx::Insets::VH(3, 10);
|
||||
+ return gfx::Insets::VH(3, 8);
|
||||
}
|
||||
|
||||
// static
|
||||
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
|
||||
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
|
||||
@@ -103,7 +103,7 @@ class OmniboxResultViewButton : public v
|
||||
BEGIN_METADATA(OmniboxResultViewButton)
|
||||
END_METADATA
|
||||
|
||||
-constexpr float kIPHBackgroundBorderRadius = 8;
|
||||
+constexpr float kIPHBackgroundBorderRadius = 6;
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -190,9 +190,6 @@ OmniboxResultView::OmniboxResultView(Omn
|
||||
|
||||
SetLayoutManager(std::make_unique<views::FillLayout>());
|
||||
@@ -102,7 +121,7 @@
|
||||
- }
|
||||
-
|
||||
- return gfx::Insets::TLBR(0, 0, 0, 16);
|
||||
+ return gfx::Insets::TLBR(2, 6, 0, 6);
|
||||
+ return gfx::Insets::TLBR(2, 4, 0, 4);
|
||||
}
|
||||
|
||||
BEGIN_METADATA(OmniboxRowView)
|
||||
@@ -132,7 +151,7 @@
|
||||
// c) Regardless of the state of those other features and their widths.
|
||||
// This applies to both touch-UI and non-touch-UI.
|
||||
- int indent = 16 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
+ int indent = 5 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
+ int indent = 3 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
|
||||
indent += omnibox_feature_configs::AdjustOmniboxIndent()
|
||||
.Get()
|
||||
@@ -140,7 +159,7 @@
|
||||
}
|
||||
|
||||
int OmniboxMatchCellView::GetTextIndent() const {
|
||||
+ return 33;
|
||||
+ return 30;
|
||||
+
|
||||
// Text indent is added to the `OmniboxMatchCellView::GetInsets()`. It is not
|
||||
// added to the image position & size.
|
||||
@@ -152,7 +171,7 @@
|
||||
// The height of the standard 1-line match row. Multiline & IPH matches have
|
||||
// larger heights.
|
||||
- static constexpr int kRowHeight = 40;
|
||||
+ static constexpr int kRowHeight = 30;
|
||||
+ static constexpr int kRowHeight = 28;
|
||||
|
||||
// The width of icon, answer, and entity image bounds. These images are
|
||||
// smaller than this bounds; they'll be centered within the bounds.
|
||||
@@ -163,7 +182,7 @@
|
||||
// (result set is empty or all results are hidden).
|
||||
if (popup_height != 0) {
|
||||
- constexpr int kExtraBottomPadding = 8;
|
||||
+ constexpr int kExtraBottomPadding = 6;
|
||||
+ constexpr int kExtraBottomPadding = 2;
|
||||
popup_height += kExtraBottomPadding;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
@@ -60,8 +60,7 @@ SelectedKeywordView::GetKeywordLabelName
|
||||
names.full_name =
|
||||
l10n_util::GetStringUTF16(IDS_STARTER_PACK_PAGE_KEYWORD_TEXT);
|
||||
} else {
|
||||
- names.full_name = l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD,
|
||||
- names.short_name);
|
||||
+ names.full_name = names.short_name;
|
||||
}
|
||||
}
|
||||
return names;
|
||||
@@ -78,6 +77,8 @@ SelectedKeywordView::SelectedKeywordView
|
||||
partial_label_.SetVisible(false);
|
||||
label()->SetElideBehavior(gfx::FADE_TAIL);
|
||||
|
||||
+ SetExpandedLabelAdditionalInsets(views::Inset1D(2, 0));
|
||||
+
|
||||
// TODO(crbug.com/40890218): `IconLabelBubbleView::GetAccessibleNodeData`
|
||||
// would set the name to explicitly empty when the name was missing.
|
||||
// That function no longer exists. As a result we need to handle that here.
|
||||
@@ -116,6 +117,7 @@ void SelectedKeywordView::SetCustomImage
|
||||
if (template_url &&
|
||||
template_url->starter_pack_id() == TemplateURLStarterPackData::kGemini) {
|
||||
vector_icon = &omnibox::kSparkIcon;
|
||||
+
|
||||
} else if (history_embeddings::IsHistoryEmbeddingsEnabledForProfile(
|
||||
profile_) &&
|
||||
history_embeddings::GetFeatureParameters().omnibox_scoped &&
|
||||
@@ -194,7 +196,7 @@ const std::u16string& SelectedKeywordVie
|
||||
|
||||
int SelectedKeywordView::GetExtraInternalSpacing() const {
|
||||
// Align the label text with the suggestion text.
|
||||
- return 14;
|
||||
+ return 2;
|
||||
}
|
||||
|
||||
void SelectedKeywordView::SetLabelForCurrentWidth() {
|
||||
@@ -0,0 +1,119 @@
|
||||
--- a/chrome/browser/ui/views/status_bubble_views.cc
|
||||
+++ b/chrome/browser/ui/views/status_bubble_views.cc
|
||||
@@ -58,7 +58,7 @@
|
||||
namespace {
|
||||
|
||||
// The roundedness of the edges of our bubble.
|
||||
-constexpr int kBubbleCornerRadius = 4;
|
||||
+constexpr int kBubbleCornerRadius = 6;
|
||||
|
||||
// How close the mouse can get to the infobubble before it starts sliding
|
||||
// off-screen.
|
||||
@@ -66,7 +66,10 @@ constexpr int kMousePadding = 20;
|
||||
|
||||
// The minimum horizontal space between the edges of the text and the edges of
|
||||
// the status bubble, not including the outer shadow ring.
|
||||
-constexpr int kTextHorizPadding = 5;
|
||||
+constexpr int kTextHorizPadding = 8;
|
||||
+constexpr int kTextVertPadding = 3;
|
||||
+
|
||||
+constexpr int kWindowMargin = 8;
|
||||
|
||||
// Delays before we start hiding or showing the bubble after we receive a
|
||||
// show or hide request.
|
||||
@@ -258,7 +261,7 @@ StatusView::~StatusView() {
|
||||
}
|
||||
|
||||
gfx::Insets StatusView::GetInsets() const {
|
||||
- return gfx::Insets::VH(kShadowThickness,
|
||||
+ return gfx::Insets::VH(kShadowThickness + kTextVertPadding,
|
||||
kShadowThickness + kTextHorizPadding);
|
||||
}
|
||||
|
||||
@@ -450,47 +453,13 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
float scale = canvas->UndoDeviceScaleFactor();
|
||||
const float radius = kBubbleCornerRadius * scale;
|
||||
|
||||
- std::array<SkScalar, 8> rad{};
|
||||
- auto round_corner = [&rad, radius](gfx::RRectF::Corner c) {
|
||||
- int index = base::to_underlying(c);
|
||||
- rad[2 * index] = radius;
|
||||
- rad[2 * index + 1] = radius;
|
||||
+ std::array<SkScalar, 8> rad = {
|
||||
+ radius, radius, // Upper-left
|
||||
+ radius, radius, // Upper-right
|
||||
+ radius, radius, // Lower-right
|
||||
+ radius, radius // Lower-left
|
||||
};
|
||||
|
||||
- // Top Edges - if the bubble is in its bottom position (sticking downwards),
|
||||
- // then we square the top edges. Otherwise, we square the edges based on the
|
||||
- // position of the bubble within the window (the bubble is positioned in the
|
||||
- // southeast corner in RTL and in the southwest corner in LTR).
|
||||
- if (style_ != BubbleStyle::kBottom) {
|
||||
- if (base::i18n::IsRTL() != (style_ == BubbleStyle::kStandardRight)) {
|
||||
- // The text is RtL or the bubble is on the right side (but not both).
|
||||
- round_corner(gfx::RRectF::Corner::kUpperLeft);
|
||||
- } else {
|
||||
- round_corner(gfx::RRectF::Corner::kUpperRight);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Bottom edges - Keep these squared off if the bubble is in its standard
|
||||
- // position (sticking upward).
|
||||
- if (style_ != BubbleStyle::kStandard &&
|
||||
- style_ != BubbleStyle::kStandardRight) {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerRight);
|
||||
- round_corner(gfx::RRectF::Corner::kLowerLeft);
|
||||
- } else {
|
||||
-#if BUILDFLAG(IS_MAC)
|
||||
- // Mac's window has rounded corners, but the corner radius might be
|
||||
- // different on different versions. Status bubble will use its own round
|
||||
- // corner on Mac when there is no download shelf beneath.
|
||||
- if (!status_bubble_->download_shelf_is_visible_) {
|
||||
- if (base::i18n::IsRTL() != (style_ == BubbleStyle::kStandard)) {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerLeft);
|
||||
- } else {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerRight);
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
// Snap to pixels to avoid shadow blurriness.
|
||||
gfx::Size scaled_size = gfx::ScaleToRoundedSize(size(), scale);
|
||||
|
||||
@@ -502,10 +471,8 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
// The shadow will overlap the window frame. Clip it off when the bubble is
|
||||
// docked. Otherwise when the bubble is floating preserve the full shadow so
|
||||
// the bubble looks complete.
|
||||
- int clip_left =
|
||||
- style_ == BubbleStyle::kStandard ? shadow_thickness_pixels : 0;
|
||||
- int clip_right =
|
||||
- style_ == BubbleStyle::kStandardRight ? shadow_thickness_pixels : 0;
|
||||
+ int clip_left = 0;
|
||||
+ int clip_right = 0;
|
||||
if (base::i18n::IsRTL()) {
|
||||
std::swap(clip_left, clip_right);
|
||||
}
|
||||
@@ -553,9 +520,6 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
: kColorStatusBubbleBackgroundFrameInactive;
|
||||
flags.setColor(color_provider->GetColor(id));
|
||||
canvas->sk_canvas()->drawPath(fill_path, flags);
|
||||
-
|
||||
- flags.setColor(color_provider->GetColor(kColorStatusBubbleShadow));
|
||||
- canvas->sk_canvas()->drawPath(stroke_path, flags);
|
||||
}
|
||||
|
||||
DEFINE_ENUM_CONVERTERS(StatusView::BubbleState,
|
||||
@@ -769,7 +733,9 @@ void StatusBubbleViews::Reposition() {
|
||||
int overlap = kShadowThickness;
|
||||
int height = GetPreferredHeight();
|
||||
int base_view_height = base_view_->bounds().height();
|
||||
- gfx::Point origin(-overlap, base_view_height - height + overlap);
|
||||
+ gfx::Point origin(
|
||||
+ -overlap + kWindowMargin, base_view_height - height - kWindowMargin + overlap
|
||||
+ );
|
||||
SetBounds(origin.x(), origin.y(), base_view_->bounds().width() / 3, height);
|
||||
}
|
||||
|
||||
@@ -96,3 +96,33 @@
|
||||
if (showing_close_button_) {
|
||||
available_width -= close_button_width;
|
||||
}
|
||||
--- a/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
@@ -53,27 +53,8 @@ SkPath TabGroupHighlight::GetPath() cons
|
||||
// which is a well-scoped interaction. A dragging group doesn't nestle in with
|
||||
// the tabs around it, so there are no special cases needed when determining
|
||||
// its shape.
|
||||
- const int corner_radius = TabStyle::Get()->GetBottomCornerRadius();
|
||||
- const int top = GetLayoutConstant(TAB_STRIP_PADDING);
|
||||
|
||||
SkPath path;
|
||||
- path.moveTo(0, bounds().height());
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.lineTo(corner_radius, top + corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, 2 * corner_radius, top);
|
||||
- path.lineTo(bounds().width() - 2 * corner_radius, top);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, bounds().width() - corner_radius,
|
||||
- top + corner_radius);
|
||||
- path.lineTo(bounds().width() - corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, bounds().width(), bounds().height());
|
||||
- path.close();
|
||||
-
|
||||
return path;
|
||||
}
|
||||
|
||||
+9
-8
@@ -167,25 +167,25 @@ helium/ui/update-cr-components.patch
|
||||
helium/ui/always-use-better-ntp.patch
|
||||
helium/ui/clean-new-tab-page.patch
|
||||
helium/ui/remove-toolbar-corners.patch
|
||||
helium/ui/location-bar-style.patch
|
||||
helium/ui/location-bar.patch
|
||||
helium/ui/layout-constants.patch
|
||||
helium/ui/tab-style.patch
|
||||
helium/ui/tabs.patch
|
||||
helium/ui/tab-strip-controls.patch
|
||||
helium/ui/toolbar-style.patch
|
||||
helium/ui/omnibox-style.patch
|
||||
helium/ui/toolbar.patch
|
||||
helium/ui/omnibox.patch
|
||||
helium/ui/app-menu-style.patch
|
||||
helium/ui/fix-customize-side-panel.patch
|
||||
helium/ui/adjust-immersive-padding.patch
|
||||
helium/ui/immersive-padding.patch
|
||||
helium/ui/side-panel.patch
|
||||
helium/ui/narrow-layout-provider.patch
|
||||
helium/ui/layout-provider.patch
|
||||
helium/ui/app-menu-model.patch
|
||||
helium/ui/remove-dead-toolbar-actions.patch
|
||||
helium/ui/remove-dead-profile-actions.patch
|
||||
helium/ui/clean-up-installed-extension-bubble.patch
|
||||
helium/ui/adjust-selected-keyword-view.patch
|
||||
helium/ui/selected-keyword-view.patch
|
||||
helium/ui/bookmark-button-bg-fix.patch
|
||||
helium/ui/restyle-ntp-tiles.patch
|
||||
helium/ui/restyle-sidepanels.patch
|
||||
helium/ui/side-panel-webui.patch
|
||||
helium/ui/helium-logo-icons.patch
|
||||
helium/ui/settings-page-icons.patch
|
||||
helium/ui/square-ntp-monograms.patch
|
||||
@@ -207,3 +207,4 @@ helium/ui/smaller-window-grab-handle.patch
|
||||
helium/ui/fix-pwa-toolbar.patch
|
||||
helium/ui/top-container.patch
|
||||
helium/ui/toolbar-avatar-button.patch
|
||||
helium/ui/status-bubble.patch
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
8
|
||||
9
|
||||
|
||||
Reference in New Issue
Block a user