forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrop_shadow_label.h
46 lines (35 loc) · 1.27 KB
/
drop_shadow_label.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_APP_LIST_DROP_SHADOW_LABEL_H_
#define UI_APP_LIST_DROP_SHADOW_LABEL_H_
#pragma once
#include <vector>
#include "ui/gfx/shadow_value.h"
#include "ui/views/controls/label.h"
namespace app_list {
/////////////////////////////////////////////////////////////////////////////
//
// DropShadowLabel class
//
// A drop shadow label is a view subclass that can display a string
// with a drop shadow.
//
/////////////////////////////////////////////////////////////////////////////
class DropShadowLabel : public views::Label {
public:
DropShadowLabel();
virtual ~DropShadowLabel();
void SetTextShadows(int shadow_count, const gfx::ShadowValue* shadows);
private:
// Overridden from views::Label:
virtual gfx::Insets GetInsets() const OVERRIDE;
virtual void PaintText(gfx::Canvas* canvas,
const string16& text,
const gfx::Rect& text_bounds,
int flags) OVERRIDE;
std::vector<gfx::ShadowValue> text_shadows_;
DISALLOW_COPY_AND_ASSIGN(DropShadowLabel);
};
} // namespace app_list
#endif // UI_APP_LIST_DROP_SHADOW_LABEL_H_