提交 a300cb77 编写于 作者: E Eric Seidel

Use drawable_xxhdpi instead of 2x_web

This makes the icons look nicer on the Nexus 5

I briefly played with trying to figure out which drawable_*
to use dynamically, but I couldn't seem to write a reasonable
solution which worked on both Desktop and my Nexus 5, leading
me to believe I didn't understand how it should work and just
went with xxhdpi for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1186633003.
上级 ede4797d
......@@ -36,11 +36,13 @@ group("sky_apk") {
"//mojo/dart/mojom",
"//mojo/public/dart:mojo",
"//sky/sdk",
"//sky/services/intents",
"//third_party/dart-pkg",
]
if (is_android) {
deps += [ "//sky/apk/demo" ]
deps += [
"//sky/apk/demo",
"//sky/services/intents",
]
}
}
......@@ -26,9 +26,12 @@ class Icon extends Component {
category = parts[0];
subtype = parts[1];
}
// TODO(eseidel): This clearly isn't correct. Not sure what would be.
// Should we use the ios images on ios?
String density = 'drawable-xxhdpi';
return new Image(
size: new Size(size.toDouble(), size.toDouble()),
src: '${kAssetBase}/${category}/2x_web/ic_${subtype}_${size}dp.png'
src: '${kAssetBase}/${category}/${density}/ic_${subtype}_${size}dp.png'
);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册