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

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

Issue 2671063002: Remove FixedSizedScrollView. (Closed)
Patch Set: rebase Created 3 years, 10 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: 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 f2f0c4919886cba70e968805a922a244a8d302d0..fb75f28be7005b827305ef83fc55bc857ef850cf 100644
--- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
+++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
@@ -11,7 +11,6 @@
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
-#include "ash/common/system/tray/fixed_sized_scroll_view.h"
#include "ash/common/system/tray/hover_highlight_view.h"
#include "ash/common/system/tray/system_menu_button.h"
#include "ash/common/system/tray/system_tray_controller.h"
@@ -42,6 +41,7 @@
#include "ui/keyboard/keyboard_util.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/label.h"
+#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/separator.h"
#include "ui/views/layout/box_layout.h"
@@ -345,19 +345,7 @@ class ImeMenuListView : public ImeListView {
protected:
void Layout() override {
gfx::Range height_range = GetImeListViewRange();
- if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
- scroller()->ClipHeightTo(height_range.start(), height_range.end());
- } else {
- uint32_t current_height = scroll_content()->height();
- int minimum_menu_width = GetMinimumMenuWidth();
- if (current_height > height_range.end()) {
- scroller()->SetFixedSize(
- gfx::Size(minimum_menu_width, height_range.end()));
- } else if (current_height < height_range.start()) {
- scroller()->SetFixedSize(
- gfx::Size(minimum_menu_width, height_range.start()));
- }
- }
+ scroller()->ClipHeightTo(height_range.start(), height_range.end());
ImeListView::Layout();
}
« no previous file with comments | « ash/common/system/chromeos/cast/tray_cast.cc ('k') | ash/common/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698