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

Unified Diff: ui/base/resource/resource_bundle_win.cc

Issue 10082020: Metro/HiDPI: Use metro resource pak in metro mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a Created 8 years, 8 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: ui/base/resource/resource_bundle_win.cc
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index 79355d67eb6f506ec200aaf93ee6da593e1f528b..bc8cbf40f66cc7b8caf469c76b9e530b76fe7d5a 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -9,6 +9,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/resource/resource_data_dll_win.h"
#include "ui/base/win/dpi.h"
+#include "ui/base/win/metro.h"
namespace ui {
@@ -42,12 +43,23 @@ void ResourceBundle::LoadCommonResources() {
use_hidpi_pak = ui::GetDPIScale() > 1.5;
#endif
- if (!use_hidpi_pak) {
- AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"));
- AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"));
- } else {
+ bool use_metro_pak = false;
+#if defined(ENABLE_METRO)
robertshield 2012/04/19 20:16:35 do we need this here? feels like it would be clean
sail 2012/04/24 04:53:36 Joi has a patch out that cleans this up: http://co
+ use_metro_pak = ui::IsInMetroMode();
+#endif
+
+ if (use_metro_pak) {
+ AddDataPack(GetResourcesPakFilePath("theme_resources_metro_1x.pak"));
+ } else if (use_hidpi_pak) {
AddDataPack(GetResourcesPakFilePath("theme_resources_2x.pak"));
+ } else {
+ AddDataPack(GetResourcesPakFilePath("theme_resources_standard.pak"));
+ }
+
+ if (use_hidpi_pak) {
AddDataPack(GetResourcesPakFilePath("ui_resources_2x.pak"));
+ } else {
+ AddDataPack(GetResourcesPakFilePath("ui_resources_standard.pak"));
}
}

Powered by Google App Engine
This is Rietveld 408576698