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

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: fix build 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
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/win/metro.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7425755e445022fbdf22b3b365c9b3b703a53e37..1a30069ddcb5bffd5cadbe33bf1a16c1f8c1d0a2 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)
+ 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"));
}
}
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/win/metro.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698