summaryrefslogtreecommitdiffstats
path: root/ui/gfx/native_theme_base.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 01:41:09 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 01:41:09 +0000
commit2ae019738a63bd7fa3f226e81ef2530edf50d1dc (patch)
tree34626cac9af0021c520d074ad320fc753c2ca0ac /ui/gfx/native_theme_base.cc
parentd471d0f2e1307cc3207bb06fb116b1df4d07e97b (diff)
downloadchromium_src-2ae019738a63bd7fa3f226e81ef2530edf50d1dc.zip
chromium_src-2ae019738a63bd7fa3f226e81ef2530edf50d1dc.tar.gz
chromium_src-2ae019738a63bd7fa3f226e81ef2530edf50d1dc.tar.bz2
aura: Update scrollbar theme.
BUG=105894 TEST=manual TBR=sky Review URL: https://chromiumcodereview.appspot.com/9837072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/native_theme_base.cc')
-rw-r--r--ui/gfx/native_theme_base.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/gfx/native_theme_base.cc b/ui/gfx/native_theme_base.cc
index 8e5871b..e786dee 100644
--- a/ui/gfx/native_theme_base.cc
+++ b/ui/gfx/native_theme_base.cc
@@ -33,6 +33,9 @@ const SkColor kSliderThumbBorderDarkGrey =
const SkColor kMenuPopupBackgroundColor = SkColorSetRGB(210, 225, 246);
+const unsigned int kDefaultScrollbarWidth = 15;
+const unsigned int kDefaultScrollbarButtonLength = 14;
+
// Get lightness adjusted color.
SkColor BrightenColor(const color_utils::HSL& hsl, SkAlpha alpha,
double lightness_amount) {
@@ -50,9 +53,6 @@ SkColor BrightenColor(const color_utils::HSL& hsl, SkAlpha alpha,
namespace gfx {
-unsigned int NativeThemeBase::button_length_ = 14;
-unsigned int NativeThemeBase::scrollbar_width_ = 15;
-
gfx::Size NativeThemeBase::GetPartSize(Part part,
State state,
const ExtraParams& extra) const {
@@ -83,10 +83,10 @@ gfx::Size NativeThemeBase::GetPartSize(Part part,
return gfx::Size(kCheckboxAndRadioWidth, kCheckboxAndRadioHeight);
case kScrollbarDownArrow:
case kScrollbarUpArrow:
- return gfx::Size(scrollbar_width_, button_length_);
+ return gfx::Size(scrollbar_width_, scrollbar_button_length_);
case kScrollbarLeftArrow:
case kScrollbarRightArrow:
- return gfx::Size(button_length_, scrollbar_width_);
+ return gfx::Size(scrollbar_button_length_, scrollbar_width_);
case kScrollbarHorizontalThumb:
// This matches Firefox on Linux.
return gfx::Size(2 * scrollbar_width_, scrollbar_width_);
@@ -204,7 +204,9 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
}
}
-NativeThemeBase::NativeThemeBase() {
+NativeThemeBase::NativeThemeBase()
+ : scrollbar_width_(kDefaultScrollbarWidth),
+ scrollbar_button_length_(kDefaultScrollbarButtonLength) {
}
NativeThemeBase::~NativeThemeBase() {