| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/controls/table/table_utils.h" | 5 #include "ui/views/controls/table/table_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
| 9 #include "ui/gfx/font_list.h" | 11 #include "ui/gfx/font_list.h" |
| 10 #include "ui/gfx/text_utils.h" | 12 #include "ui/gfx/text_utils.h" |
| 11 #include "ui/views/controls/table/table_view.h" | 13 #include "ui/views/controls/table/table_view.h" |
| 12 | 14 |
| 13 namespace views { | 15 namespace views { |
| 14 | 16 |
| 15 const int kUnspecifiedColumnWidth = 90; | 17 const int kUnspecifiedColumnWidth = 90; |
| 16 | 18 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const std::vector<TableView::VisibleColumn>& columns( | 110 const std::vector<TableView::VisibleColumn>& columns( |
| 109 table->visible_columns()); | 111 table->visible_columns()); |
| 110 for (size_t i = 0; i < columns.size(); ++i) { | 112 for (size_t i = 0; i < columns.size(); ++i) { |
| 111 if (x <= columns[i].x + columns[i].width) | 113 if (x <= columns[i].x + columns[i].width) |
| 112 return static_cast<int>(i); | 114 return static_cast<int>(i); |
| 113 } | 115 } |
| 114 return static_cast<int>(columns.size()) - 1; | 116 return static_cast<int>(columns.size()) - 1; |
| 115 } | 117 } |
| 116 | 118 |
| 117 } // namespace views | 119 } // namespace views |
| OLD | NEW |