From ae1482947256bfa013ce008aa733bf5771c58021 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 5 Jan 2016 10:20:02 +0800 Subject: [PATCH] Load content_shell.pak for current scale factor --- brightray/common/main_delegate.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/brightray/common/main_delegate.cc b/brightray/common/main_delegate.cc index 218422f411..d97d5b63b5 100644 --- a/brightray/common/main_delegate.cc +++ b/brightray/common/main_delegate.cc @@ -48,9 +48,10 @@ void MainDelegate::InitializeResourceBundle() { path = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); #endif - ui::ResourceBundle::InitSharedInstanceWithLocale("", NULL, + ui::ResourceBundle::InitSharedInstanceWithLocale("", nullptr, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); - ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(path, ui::SCALE_FACTOR_100P); + ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( + path, ui::GetSupportedScaleFactors()[0]); AddDataPackFromPath(&ui::ResourceBundle::GetSharedInstance(), path.DirName()); }