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

Unified Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc

Issue 2478273003: Use overlay scrollbars for the cros system menu. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « no previous file | ash/common/system/tray/fixed_sized_scroll_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
index 7eea7e751c6a192668d34d3edfeef7bd9e439751..f90ccbb6a85fee19fa1e59d276c4a45a2cf2c7cf 100644
--- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
+++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
@@ -364,11 +364,14 @@ void ImeMenuTray::ShowImeMenuBubble() {
uint32_t current_height = ime_list_view_->scroll_content()->height();
const gfx::Range height_range = GetImeListViewRange();
- if (current_height > height_range.end()) {
+
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ ime_list_view_->scroller()->ClipHeightTo(height_range.start(),
+ height_range.end());
+ } else if (current_height > height_range.end()) {
ime_list_view_->scroller()->SetFixedSize(
gfx::Size(kTrayPopupMaxWidth, height_range.end()));
- } else if (MaterialDesignController::IsSystemTrayMenuMaterial() &&
- current_height < height_range.start()) {
+ } else if (current_height < height_range.start()) {
ime_list_view_->scroller()->SetFixedSize(
gfx::Size(kTrayPopupMaxWidth, height_range.start()));
}
« no previous file with comments | « no previous file | ash/common/system/tray/fixed_sized_scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698