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

Side by Side Diff: chrome/views/table_view.cc

Issue 18076: request review: fix issue 2821 and 6132 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/views/native_control.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 #include <windowsx.h> 6 #include <windowsx.h>
7 7
8 #include "chrome/views/table_view.h" 8 #include "chrome/views/table_view.h"
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 if (single_selection_) 800 if (single_selection_)
801 style |= LVS_SINGLESEL; 801 style |= LVS_SINGLESEL;
802 // If there's only one column and the title string is empty, don't show a 802 // If there's only one column and the title string is empty, don't show a
803 // header. 803 // header.
804 if (all_columns_.size() == 1) { 804 if (all_columns_.size() == 1) {
805 std::map<int, TableColumn>::const_iterator first = 805 std::map<int, TableColumn>::const_iterator first =
806 all_columns_.begin(); 806 all_columns_.begin();
807 if (first->second.title.empty()) 807 if (first->second.title.empty())
808 style |= LVS_NOCOLUMNHEADER; 808 style |= LVS_NOCOLUMNHEADER;
809 } 809 }
810 list_view_ = ::CreateWindowEx(WS_EX_CLIENTEDGE | GetAdditionalExStyle(), 810 list_view_ = ::CreateWindowEx(WS_EX_CLIENTEDGE | GetAdditionalRTLStyle(),
811 WC_LISTVIEW, 811 WC_LISTVIEW,
812 L"", 812 L"",
813 style, 813 style,
814 0, 0, width(), height(), 814 0, 0, width(), height(),
815 parent_container, NULL, NULL, NULL); 815 parent_container, NULL, NULL, NULL);
816 816
817 // Make the selection extend across the row. 817 // Make the selection extend across the row.
818 // Reduce overdraw/flicker artifacts by double buffering. 818 // Reduce overdraw/flicker artifacts by double buffering.
819 DWORD list_view_style = LVS_EX_FULLROWSELECT; 819 DWORD list_view_style = LVS_EX_FULLROWSELECT;
820 if (win_util::GetWinVersion() > win_util::WINVERSION_2000) { 820 if (win_util::GetWinVersion() > win_util::WINVERSION_2000) {
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 } 1559 }
1560 1560
1561 void TableSelectionIterator::UpdateModelIndexFromViewIndex() { 1561 void TableSelectionIterator::UpdateModelIndexFromViewIndex() {
1562 if (view_index_ == -1) 1562 if (view_index_ == -1)
1563 model_index_ = -1; 1563 model_index_ = -1;
1564 else 1564 else
1565 model_index_ = table_view_->view_to_model(view_index_); 1565 model_index_ = table_view_->view_to_model(view_index_);
1566 } 1566 }
1567 1567
1568 } // namespace views 1568 } // namespace views
OLDNEW
« no previous file with comments | « chrome/views/native_control.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698