Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 1866403005: Fix rtl shelf overflow bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move RTL adjustment (bubble_frame_view -> non_client_view) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 0dfb629e7f5ea41c5cc0f26dd7a105e80aea143a..0f25502b952ee440aa86a9771a1f9e8c9fe100b8 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -94,6 +94,7 @@ bool BubbleDialogDelegateView::ShouldShowCloseButton() const {
ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) {
DialogClientView* client = new DialogClientView(widget, GetContentsView());
client->set_button_row_insets(gfx::Insets());
+ widget->non_client_view()->set_mirror_client_in_rtl(mirror_arrow_in_rtl_);
return client;
}
@@ -108,7 +109,7 @@ NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView(
frame->SetFootnoteView(CreateFootnoteView());
BubbleBorder::Arrow adjusted_arrow = arrow();
- if (base::i18n::IsRTL())
+ if (base::i18n::IsRTL() && mirror_arrow_in_rtl_)
adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow);
frame->SetBubbleBorder(std::unique_ptr<BubbleBorder>(
new BubbleBorder(adjusted_arrow, shadow(), color())));
@@ -205,6 +206,7 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
anchor_view_storage_id_(ViewStorage::GetInstance()->CreateStorageID()),
anchor_widget_(NULL),
arrow_(arrow),
+ mirror_arrow_in_rtl_(true),
shadow_(BubbleBorder::SMALL_SHADOW),
color_explicitly_set_(false),
margins_(kPanelVertMargin,

Powered by Google App Engine
This is Rietveld 408576698