diff options
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/scrollbar/bitmap_scroll_bar.cc | 7 | ||||
-rw-r--r-- | views/controls/table/group_table_view.cc | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc index 98a95ff..cba747a 100644 --- a/views/controls/scrollbar/bitmap_scroll_bar.cc +++ b/views/controls/scrollbar/bitmap_scroll_bar.cc @@ -107,9 +107,8 @@ class BitmapScrollBarThumb : public View { // Make sure the thumb is never sized smaller than its minimum possible // display size. gfx::Size prefsize = GetPreferredSize(); - size = std::max(size, - static_cast<int>(scroll_bar_->IsHorizontal() ? - prefsize.width() : prefsize.height())); + size = std::max(size, scroll_bar_->IsHorizontal() ? prefsize.width() : + prefsize.height()); gfx::Rect thumb_bounds = bounds(); if (scroll_bar_->IsHorizontal()) { thumb_bounds.set_width(size); @@ -305,7 +304,7 @@ gfx::Rect BitmapScrollBar::GetTrackBounds() const { if (!show_scroll_buttons_) prefsize.set_width(0); int new_width = - std::max(0, static_cast<int>(width() - (prefsize.width() * 2))); + std::max(0, width() - (prefsize.width() * 2)); gfx::Rect track_bounds(prefsize.width(), 0, new_width, prefsize.height()); return track_bounds; } diff --git a/views/controls/table/group_table_view.cc b/views/controls/table/group_table_view.cc index a70515d..84573a9 100644 --- a/views/controls/table/group_table_view.cc +++ b/views/controls/table/group_table_view.cc @@ -174,13 +174,13 @@ void GroupTableView::PostPaint(int model_row, int column, bool selected, // We always paint a vertical line at the end of the last cell. HPEN hPen = CreatePen(PS_SOLID, kSeparatorLineThickness, kSeparatorLineColor); HPEN hPenOld = (HPEN) SelectObject(hdc, hPen); - int x = static_cast<int>(bounds.right() - kSeparatorLineThickness); + int x = bounds.right() - kSeparatorLineThickness; MoveToEx(hdc, x, bounds.y(), NULL); LineTo(hdc, x, bounds.bottom()); // We paint a separator line after the last item of a group. if (model_row == (group_range.start + group_range.length - 1)) { - int y = static_cast<int>(bounds.bottom() - kSeparatorLineThickness); + int y = bounds.bottom() - kSeparatorLineThickness; MoveToEx(hdc, 0, y, NULL); LineTo(hdc, bounds.width(), y); } |