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

Unified Diff: ash/frame/caption_buttons/frame_caption_button.h

Issue 1566563002: Vectorize CrOS window control icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dummy GetIcon impl in TestToolbarModel Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash.gyp ('k') | ash/frame/caption_buttons/frame_caption_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/caption_buttons/frame_caption_button.h
diff --git a/ash/frame/caption_buttons/frame_caption_button.h b/ash/frame/caption_buttons/frame_caption_button.h
index bd12e1205d8f7e77659ab24d0d7c9b9d6b685737..a8ed2a76f60f14278cbdb6e380437917d5729d1e 100644
--- a/ash/frame/caption_buttons/frame_caption_button.h
+++ b/ash/frame/caption_buttons/frame_caption_button.h
@@ -14,6 +14,7 @@
namespace gfx {
class SlideAnimation;
+enum class VectorIconId;
}
namespace ash {
@@ -36,7 +37,9 @@ class ASH_EXPORT FrameCaptionButton : public views::CustomButton {
// the button crossfades to the new visuals. If the image id matches the one
// currently used by the button and |animate| is ANIMATE_NO, the crossfade
// animation is progressed to the end.
- void SetImage(CaptionButtonIcon icon, Animate animate, int icon_image_id);
+ void SetImage(CaptionButtonIcon icon,
+ Animate animate,
+ gfx::VectorIconId icon_image_id);
// Returns true if the button is crossfading to new visuals set in
// SetImage().
@@ -54,11 +57,13 @@ class ASH_EXPORT FrameCaptionButton : public views::CustomButton {
paint_as_active_ = paint_as_active;
}
+ void set_use_light_images(bool light) { use_light_images_ = light; }
+
CaptionButtonIcon icon() const {
return icon_;
}
- int icon_image_id() const { return icon_image_id_; }
+ gfx::VectorIconId icon_image_id() const { return icon_image_id_; }
void set_size(const gfx::Size& size) { size_ = size; }
@@ -81,11 +86,14 @@ class ASH_EXPORT FrameCaptionButton : public views::CustomButton {
// Whether the button should be painted as active.
bool paint_as_active_;
+ // Whether to paint in a lighter color (for use on dark backgrounds).
+ bool use_light_images_;
+
// Current alpha to use for painting.
int alpha_;
// The image id and image used to paint the button's icon.
- int icon_image_id_;
+ gfx::VectorIconId icon_image_id_;
gfx::ImageSkia icon_image_;
// The icon image to crossfade from.
« no previous file with comments | « ash/ash.gyp ('k') | ash/frame/caption_buttons/frame_caption_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698