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

Side by Side Diff: ash/common/shelf/app_list_button.h

Issue 2509743002: Adjust MD shelf app list icon for better centering. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | ash/common/shelf/app_list_button.cc » ('j') | ash/common/shelf/app_list_button.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ASH_COMMON_SHELF_APP_LIST_BUTTON_H_ 5 #ifndef ASH_COMMON_SHELF_APP_LIST_BUTTON_H_
6 #define ASH_COMMON_SHELF_APP_LIST_BUTTON_H_ 6 #define ASH_COMMON_SHELF_APP_LIST_BUTTON_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/controls/button/image_button.h" 10 #include "ui/views/controls/button/image_button.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool ShouldEnterPushedState(const ui::Event& event) override; 43 bool ShouldEnterPushedState(const ui::Event& event) override;
44 std::unique_ptr<views::InkDrop> CreateInkDrop() override; 44 std::unique_ptr<views::InkDrop> CreateInkDrop() override;
45 45
46 // ui::EventHandler overrides: 46 // ui::EventHandler overrides:
47 void OnGestureEvent(ui::GestureEvent* event) override; 47 void OnGestureEvent(ui::GestureEvent* event) override;
48 48
49 private: 49 private:
50 // Toggles the active state for painting the background and schedules a paint. 50 // Toggles the active state for painting the background and schedules a paint.
51 void SetDrawBackgroundAsActive(bool draw_background_as_active); 51 void SetDrawBackgroundAsActive(bool draw_background_as_active);
52 52
53 // Helper functions to paint the background and foreground of the AppList 53 // Helper function to paint the background and foreground of the AppList
54 // button in Chrome OS MD. 54 // button in Chrome OS MD.
55 void PaintBackgroundMD(gfx::Canvas* canvas); 55 void PaintMd(gfx::Canvas* canvas);
56 void PaintForegroundMD(gfx::Canvas* canvas,
57 const gfx::ImageSkia& foreground_image);
58 56
59 // Helper function to paint the AppList button in Chrome OS non-MD. 57 // Helper function to paint the AppList button in Chrome OS non-MD.
60 void PaintAppListButton(gfx::Canvas* canvas, 58 void PaintAppListButton(gfx::Canvas* canvas,
61 const gfx::ImageSkia& foreground_image); 59 const gfx::ImageSkia& foreground_image);
62 60
63 // True if the background should render as active, regardless of the state of 61 // True if the background should render as active, regardless of the state of
64 // the application list. 62 // the application list.
65 bool draw_background_as_active_; 63 bool draw_background_as_active_;
66 64
67 // Alpha value used to paint the background. 65 // Alpha value used to paint the background.
68 int background_alpha_; 66 int background_alpha_;
69 67
70 InkDropButtonListener* listener_; 68 InkDropButtonListener* listener_;
71 ShelfView* shelf_view_; 69 ShelfView* shelf_view_;
72 WmShelf* wm_shelf_; 70 WmShelf* wm_shelf_;
73 71
74 DISALLOW_COPY_AND_ASSIGN(AppListButton); 72 DISALLOW_COPY_AND_ASSIGN(AppListButton);
75 }; 73 };
76 74
77 } // namespace ash 75 } // namespace ash
78 76
79 #endif // ASH_COMMON_SHELF_APP_LIST_BUTTON_H_ 77 #endif // ASH_COMMON_SHELF_APP_LIST_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/app_list_button.cc » ('j') | ash/common/shelf/app_list_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698