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

Unified Diff: ash/ime/candidate_window_view.cc

Issue 258463002: Introduces 'highlighted' property to candidate view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 8 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 | « ash/ime/candidate_view_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/ime/candidate_window_view.cc
diff --git a/ash/ime/candidate_window_view.cc b/ash/ime/candidate_window_view.cc
index 87a39f5afdccabe74af565ff40da22b98a8c01d4..861e8121b13856d558e97862feceb125245d98eb 100644
--- a/ash/ime/candidate_window_view.cc
+++ b/ash/ime/candidate_window_view.cc
@@ -283,12 +283,12 @@ void CandidateWindowView::UpdateCandidates(
const ui::CandidateWindow::Entry& entry =
new_candidate_window.candidates()[candidate_index];
candidate_view->SetEntry(entry);
- candidate_view->SetState(views::Button::STATE_NORMAL);
+ candidate_view->SetEnabled(true);
candidate_view->SetInfolistIcon(!entry.description_title.empty());
} else {
// Disable the empty row.
candidate_view->SetEntry(ui::CandidateWindow::Entry());
- candidate_view->SetState(views::Button::STATE_DISABLED);
+ candidate_view->SetEnabled(false);
candidate_view->SetInfolistIcon(false);
}
if (new_candidate_window.orientation() == ui::CandidateWindow::VERTICAL) {
@@ -328,8 +328,8 @@ void CandidateWindowView::UpdateCandidates(
if (0 <= selected_candidate_index_in_page_ &&
static_cast<size_t>(selected_candidate_index_in_page_) <
candidate_views_.size()) {
- candidate_views_[selected_candidate_index_in_page_]->SetState(
- views::Button::STATE_NORMAL);
+ candidate_views_[selected_candidate_index_in_page_]->SetHighlighted(
+ false);
selected_candidate_index_in_page_ = -1;
}
}
@@ -388,7 +388,7 @@ void CandidateWindowView::SelectCandidateAt(int index_in_page) {
selected_candidate_index_in_page_ = index_in_page;
// Select the candidate specified by index_in_page.
- candidate_views_[index_in_page]->SetState(views::Button::STATE_PRESSED);
+ candidate_views_[index_in_page]->SetHighlighted(true);
// Update the cursor indexes in the model.
candidate_window_.set_cursor_position(cursor_absolute_index);
« no previous file with comments | « ash/ime/candidate_view_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698