Skip to content

Commit

Permalink
Outline for address bar changed to grey, along with other minor top c…
Browse files Browse the repository at this point in the history
…hrome changes.
  • Loading branch information
win32ss committed Apr 23, 2024
1 parent af82e09 commit 556ce55
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/extensions/cws_info_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void CWSInfoService::SendRequest() {
auto resource_request = std::make_unique<network::ResourceRequest>();
resource_request->url = GURL(kRequestUrl);
if (base::CommandLine::ForCurrentProcess()->HasSwitch("ungoogled-supermium"))
resource_request->url = GURL("google-must-be-stopped");
return; //resource_request->url = GURL("google-must-be-stopped");
// A POST request is sent with an override to GET due to server requirements.
resource_request->method = "POST";
resource_request->load_flags = net::LOAD_DISABLE_CACHE;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/frame/browser_frame_view_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ gfx::Rect BrowserFrameViewWin::GetBoundsForTabStripRegion(
const gfx::Size& tabstrip_minimum_size) const {
int x = CaptionButtonsOnLeadingEdge() ? CaptionButtonsRegionWidth() : 0;
if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
x = 24;
x = 8;
int end_x = width();
if (!CaptionButtonsOnLeadingEdge()) {
end_x = std::min(width() - CaptionButtonsRegionWidth(), end_x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStripRegion(
int total_width) const {
int x = available_space_leading_x_;
if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
x = 24;
x = 8;
const int available_width = available_space_trailing_x_ - x;
return gfx::Rect(x, GetTabStripInsetsTop(false), std::max(0, available_width),
tabstrip_minimum_size.height());
Expand Down
13 changes: 9 additions & 4 deletions chrome/browser/ui/views/location_bar/location_bar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ void LocationBarView::Init() {
if (browser_) {
if (sharing_hub::HasPageAction(profile_, is_popup_mode_) &&
!features::IsChromeRefresh2023()) {
params.types_enabled.push_back(PageActionIconType::kSharingHub);
if (!base::CommandLine::ForCurrentProcess()->HasSwitch("disable-sharing-hub"))
params.types_enabled.push_back(PageActionIconType::kSharingHub);
}
}
if (browser_ && !is_popup_mode_)
Expand Down Expand Up @@ -1158,7 +1159,7 @@ void LocationBarView::RefreshBackground() {
border_color = color_provider->GetColor(kColorLocationBarBorderOnMismatch);
}
if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
border_color = SK_ColorBLACK;
border_color = SK_ColorGRAY;
if (is_popup_mode_) {
SetBackground(views::CreateSolidBackground(background_color));
} else {
Expand All @@ -1170,8 +1171,12 @@ void LocationBarView::RefreshBackground() {
// Keep the views::Textfield in sync. It needs an opaque background to
// correctly enable subpixel AA.
omnibox_view_->SetBackgroundColor(background_color);
if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
omnibox_view_->SetBorder(views::CreateSolidSidedBorder(gfx::Insets::TLBR(1, 0, 1, 0), SK_ColorBLACK));
if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox") &&
base::CommandLine::ForCurrentProcess()->HasSwitch("compact-ui"))
// When the location bar is shrunken, the border above is only drawn on the sides.
// To resolve this, an extra border is drawn in that area on the top and bottom.
// Ideally, only one border would be drawn.
omnibox_view_->SetBorder(views::CreateSolidSidedBorder(gfx::Insets::TLBR(1, 0, 1, 0), SK_ColorGRAY));
SchedulePaint();
}

Expand Down

0 comments on commit 556ce55

Please sign in to comment.