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

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: Small review fixes (and merge) 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
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 683a79460138ebca339d46e2a25ff43c80a8d9a2..066626b81daf97ab94b83a6e1d32b373101c0e3e 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())));
@@ -201,6 +202,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,
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698