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

Unified Diff: ash/sticky_keys/sticky_keys_overlay.cc

Issue 142523003: Renames gfx::FontList::Derive* family. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and more fixes. Created 6 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
Index: ash/sticky_keys/sticky_keys_overlay.cc
diff --git a/ash/sticky_keys/sticky_keys_overlay.cc b/ash/sticky_keys/sticky_keys_overlay.cc
index 19e5acbcb517793488e9f287c269ba70bb68c524..cc2462fdbfe8519e52e8512568365e5b84b6f23a 100644
--- a/ash/sticky_keys/sticky_keys_overlay.cc
+++ b/ash/sticky_keys/sticky_keys_overlay.cc
@@ -11,6 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
@@ -71,8 +72,7 @@ StickyKeyOverlayLabel::StickyKeyOverlayLabel(const std::string& key_name)
: state_(STICKY_KEY_STATE_DISABLED) {
SetText(base::UTF8ToUTF16(key_name));
SetHorizontalAlignment(gfx::ALIGN_LEFT);
- SetFontList(
- font_list().DeriveFontListWithSize(18));
+ SetFontList(font_list().DeriveWithSizeDelta(4));
Alexei Svitkine (slow) 2014/01/23 18:47:54 Can you comment where the 4 comes from? Are you su
Yuki 2014/01/24 10:23:20 The default font size depends on platforms and use
Alexei Svitkine (slow) 2014/01/24 15:53:41 I agree with the motivation and also agree that if
Yuki 2014/01/27 07:03:49 Here are screenshots (on Pixel). I took screensho
Alexei Svitkine (slow) 2014/01/27 16:00:38 Thanks for checking! Switching to LargeFont indee
SetAutoColorReadabilityEnabled(false);
SetFocusable(false);
SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF));
@@ -102,7 +102,7 @@ void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) {
SetEnabledColor(label_color);
SetDisabledColor(label_color);
- SetFontList(font_list().DeriveFontListWithSizeDeltaAndStyle(0, style));
+ SetFontList(font_list().Derive(0, style));
}
void StickyKeyOverlayLabel::PaintText(gfx::Canvas* canvas,

Powered by Google App Engine
This is Rietveld 408576698