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

Unified Diff: ui/views/controls/table/table_header.cc

Issue 11827007: Couple of tweaks for tables: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add #ifdef for SetGrouper in example Created 7 years, 11 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/controls/table/table_header.h ('k') | ui/views/controls/table/table_view_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/table/table_header.cc
diff --git a/ui/views/controls/table/table_header.cc b/ui/views/controls/table/table_header.cc
index dc9fab85baa16c8ddadd30477e92aa46431c315e..380d9daea22e158ea003caf29a824ca59215dd03 100644
--- a/ui/views/controls/table/table_header.cc
+++ b/ui/views/controls/table/table_header.cc
@@ -17,7 +17,6 @@ namespace views {
namespace {
const int kVerticalPadding = 6;
-const int kHorizontalPadding = 4;
// The minimum width we allow a column to go down to.
const int kMinColumnWidth = 10;
@@ -38,6 +37,9 @@ gfx::NativeCursor GetResizeCursor() {
} // namespace
+// static
+const int TableHeader::kHorizontalPadding = 4;
+
typedef std::vector<TableView::VisibleColumn> Columns;
TableHeader::TableHeader(TableView* table) : table_(table) {
@@ -90,8 +92,10 @@ bool TableHeader::OnMousePressed(const ui::MouseEvent& event) {
resize_details_->initial_width =
table_->visible_columns()[index].width;
}
+ return true;
}
- return true;
+ // Return false so that context menus on ancestors work.
+ return false;
}
bool TableHeader::OnMouseDragged(const ui::MouseEvent& event) {
« no previous file with comments | « ui/views/controls/table/table_header.h ('k') | ui/views/controls/table/table_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698