summaryrefslogtreecommitdiffstats
path: root/ui/native_theme
diff options
context:
space:
mode:
authorpfeldman <pfeldman@chromium.org>2015-09-10 15:24:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-10 22:24:55 +0000
commit50a8f021f85483d296916c9b81987cb042fa5986 (patch)
treef7671e37cae888ea96c2db155c632425f507abc9 /ui/native_theme
parent5afa2934ff3810486b77982d4a815763a7b17fdd (diff)
downloadchromium_src-50a8f021f85483d296916c9b81987cb042fa5986.zip
chromium_src-50a8f021f85483d296916c9b81987cb042fa5986.tar.gz
chromium_src-50a8f021f85483d296916c9b81987cb042fa5986.tar.bz2
Revert of Make checkboxes/radio buttons larger on Android (patchset #1 id:1 of https://codereview.chromium.org/1330853002/ )
Reason for revert: This is breaking the web: https://code.google.com/p/chromium/issues/detail?id=530040 Original issue's description: > Make checkboxes/radio buttons larger on Android > > In order to make interacting with checkboxes and radio buttons easier > with touch, their default size is changed from 13px by 13px (in which > 1px in each dimension is for the drop shadow) to 16px by 16px (in which > 2px in each dimension is for a padding around them, including the dorp > shadow). For non-Android cases, an extra pixel padding is added to each > dimension to compelete the padding around them and make checkboxes and > radio buttons centered properly inside their client rects. > > BUG=459055 > > Committed: https://crrev.com/c43b29634e408c0f24d10037fae249f7d8cd2201 > Cr-Commit-Position: refs/heads/master@{#348016} TBR=sadrul@chromium.org,rbyers@chromium.org,mohsen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=459055 Review URL: https://codereview.chromium.org/1338493003 Cr-Commit-Position: refs/heads/master@{#348258}
Diffstat (limited to 'ui/native_theme')
-rw-r--r--ui/native_theme/native_theme_android.cc15
-rw-r--r--ui/native_theme/native_theme_android.h4
-rw-r--r--ui/native_theme/native_theme_base.cc7
3 files changed, 3 insertions, 23 deletions
diff --git a/ui/native_theme/native_theme_android.cc b/ui/native_theme/native_theme_android.cc
index 71ef3d0..5fe2632 100644
--- a/ui/native_theme/native_theme_android.cc
+++ b/ui/native_theme/native_theme_android.cc
@@ -6,16 +6,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "ui/gfx/geometry/size.h"
namespace ui {
-namespace {
-// These are the default dimensions of radio buttons and checkboxes on Android.
-const int kCheckboxAndRadioWidth = 16;
-const int kCheckboxAndRadioHeight = 16;
-}
-
#if !defined(USE_AURA)
// static
NativeTheme* NativeTheme::instance() {
@@ -29,14 +22,6 @@ NativeThemeAndroid* NativeThemeAndroid::instance() {
return &s_native_theme;
}
-gfx::Size NativeThemeAndroid::GetPartSize(Part part,
- State state,
- const ExtraParams& extra) const {
- if (part == kCheckbox || part == kRadio)
- return gfx::Size(kCheckboxAndRadioWidth, kCheckboxAndRadioHeight);
- return NativeThemeBase::GetPartSize(part, state, extra);
-}
-
SkColor NativeThemeAndroid::GetSystemColor(ColorId color_id) const {
NOTIMPLEMENTED();
return SK_ColorBLACK;
diff --git a/ui/native_theme/native_theme_android.h b/ui/native_theme/native_theme_android.h
index 873cd43..657d82d 100644
--- a/ui/native_theme/native_theme_android.h
+++ b/ui/native_theme/native_theme_android.h
@@ -14,10 +14,6 @@ class NativeThemeAndroid : public NativeThemeBase {
public:
static NativeThemeAndroid* instance();
- // NativeThemeBase:
- gfx::Size GetPartSize(Part part,
- State state,
- const ExtraParams& extra) const override;
SkColor GetSystemColor(ColorId color_id) const override;
private:
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index a4f007c..c266869 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -27,8 +27,8 @@
namespace {
// These are the default dimensions of radio buttons and checkboxes.
-const int kCheckboxAndRadioWidth = 14;
-const int kCheckboxAndRadioHeight = 14;
+const int kCheckboxAndRadioWidth = 13;
+const int kCheckboxAndRadioHeight = 13;
// These sizes match the sizes in Chromium Win.
const int kSliderThumbWidth = 11;
@@ -591,8 +591,7 @@ SkRect NativeThemeBase::PaintCheckboxRadioCommon(
}
// Make room for the drop shadow.
- skrect.iset(skrect.x() + 1, skrect.y() + 1, skrect.right() - 1,
- skrect.bottom() - 1);
+ skrect.iset(skrect.x(), skrect.y(), skrect.right() - 1, skrect.bottom() - 1);
// Draw the drop shadow below the widget.
if (state != kPressed) {