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

Unified Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 2344703002: Fix task manager's default sizing. (Closed)
Patch Set: rebase + commentary Created 4 years, 2 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 | « chrome/browser/ui/views/task_manager_view.h ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/task_manager_view.cc
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index ba09251951a93c765242979e80dc937a3c4bf8f6..ad6fc889eb03b35938b22c4d939a88f29da71d9b 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -152,7 +152,16 @@ void TaskManagerView::SetSortDescriptor(const TableSortDescriptor& descriptor) {
}
gfx::Size TaskManagerView::GetPreferredSize() const {
- return gfx::Size(460, 270);
+ gfx::Size table_size = tab_table_parent_->GetPreferredSize();
+ // The task name column expands to use excess space but also defaults to
+ // to a very narrow width: just enough to fit "Task" in English, and not
+ // enough to fit most actual task names such as "Tab: My email inbox". Add
+ // some extra width here to make the task names more readable.
+ table_size.set_width(table_size.width() + 180);
+ table_size.set_height(270);
+ gfx::Insets border = GetInsets();
+ table_size.Enlarge(border.width(), border.height());
+ return table_size;
}
bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) {
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.h ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698