Skip to content
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

Fix error I made! #509

Merged
merged 15 commits into from
Apr 24, 2024
6 changes: 5 additions & 1 deletion chrome/browser/ui/views/location_bar/location_bar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,11 @@ 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-border"))
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