Searched refs:themeConfig (Results 1 - 6 of 6) sorted by relevance
/base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
H A D | theme_config_test.cpp | 40 std::shared_ptr<ThemeConfig> themeConfig; member in __anon284::ThemeConfigTest 57 this->themeConfig = std::make_shared<ThemeConfig>(); in SetUp() 73 this->themeConfig->SetThemeDirection(DIRECTION_VERTICAL); in HWTEST_F() 74 EXPECT_EQ(this->themeConfig->GetThemeDirection(), DIRECTION_VERTICAL); in HWTEST_F() 84 this->themeConfig->SetThemeColorMode(DARK); in HWTEST_F() 85 EXPECT_EQ(this->themeConfig->GetThemeColorMode(), DARK); in HWTEST_F() 95 this->themeConfig->SetThemeDirection(DIRECTION_NOT_SET); in HWTEST_F() 97 bool ret = this->themeConfig->Match(themeConfig, *this->resConfig); in HWTEST_F() 101 ret = this->themeConfig in HWTEST_F() [all...] |
/base/global/resource_management/frameworks/resmgr/src/ |
H A D | theme_pack_config.cpp | 34 bool ThemeConfig::Match(const std::shared_ptr<ThemeConfig> &themeConfig, const ResConfigImpl &resConfig) in Match() argument 38 ColorMode themeColorMode_ = themeConfig->GetThemeColorMode(); in Match() 39 Direction themeDirection_ = themeConfig->GetThemeDirection(); in Match() 56 bool ThemeConfig::BestMatch(const std::shared_ptr<ThemeConfig> &themeConfig, const ResConfigImpl &resConfig) const in BestMatch() argument 60 ColorMode themeColorMode_ = themeConfig->GetThemeColorMode(); in BestMatch() 61 Direction themeDirection_ = themeConfig->GetThemeDirection(); in BestMatch() 69 return this->IsMoreMatchThan(themeConfig); in BestMatch() 72 bool ThemeConfig::IsMoreMatchThan(const std::shared_ptr<ThemeConfig> &themeConfig) const in IsMoreMatchThan() 74 if (this->themeDirection_ != themeConfig->themeDirection_) { in IsMoreMatchThan() 78 if (this->themeColorMode_ != themeConfig in IsMoreMatchThan() [all...] |
H A D | theme_pack_resource.cpp | 49 std::shared_ptr<ThemeConfig> themeConfig, const std::string &value) : themeKey_(themeKey), in ThemeQualifierValue() 50 themeConfig_(themeConfig), resValue_(value) in ThemeQualifierValue() 83 auto themeConfig = std::make_shared<ThemeConfig>(); in GetThemeConfig() local 86 themeConfig->SetThemeColorMode(ColorMode::DARK); in GetThemeConfig() 88 themeConfig->SetThemeDirection(Direction::DIRECTION_HORIZONTAL); in GetThemeConfig() 90 themeConfig->SetThemeDirection(Direction::DIRECTION_HORIZONTAL); in GetThemeConfig() 91 themeConfig->SetThemeColorMode(ColorMode::DARK); in GetThemeConfig() 95 return themeConfig; in GetThemeConfig() 109 std::shared_ptr<ThemeConfig> themeConfig, const std::string &resTypeStr) in InitThemeRes() 132 auto themeQualifierValue = std::make_shared<ThemeQualifierValue>(themeKey, themeConfig, in InitThemeRes() 48 ThemeQualifierValue(const ThemeKey themeKey, std::shared_ptr<ThemeConfig> themeConfig, const std::string &value) ThemeQualifierValue() argument 108 InitThemeRes(std::pair<std::string, std::string> bundleInfo, cJSON *root, std::shared_ptr<ThemeConfig> themeConfig, const std::string &resTypeStr) InitThemeRes() argument 165 auto themeConfig = GetThemeConfig(jsonPath); ParseJson() local 186 auto themeConfig = GetThemeConfig(iconPath); ParseIcon() local [all...] |
H A D | theme_pack_manager.cpp | 259 auto themeConfig = path->GetThemeConfig(); in GetBestMatchThemeResource() local 260 if (!ThemeConfig::Match(themeConfig, resConfig)) { in GetBestMatchThemeResource() 264 bestThemeConfig = themeConfig; in GetBestMatchThemeResource() 268 if (!bestThemeConfig->BestMatch(themeConfig, resConfig)) { in GetBestMatchThemeResource() 269 bestThemeConfig = themeConfig; in GetBestMatchThemeResource()
|
/base/global/resource_management/frameworks/resmgr/include/ |
H A D | theme_pack_config.h | 53 * Whether this themeConfig match the device resConfig 55 * @param themeConfig the theme resConfig 57 * @return true if this themeConfig match the device resConfig, else false 59 static bool Match(const std::shared_ptr<ThemeConfig> &themeConfig, const ResConfigImpl &resConfig); 62 * Whether this themeConfig best match the device resConfig 64 * @param themeConfig the theme resConfig 66 * @return true if this themeConfig best match the device resConfig, else false 68 bool BestMatch(const std::shared_ptr<ThemeConfig> &themeConfig, const ResConfigImpl &resConfig) const; 70 bool IsMoreMatchThan(const std::shared_ptr<ThemeConfig> &themeConfig) const;
|
H A D | theme_pack_resource.h | 83 ThemeQualifierValue(const ThemeKey themeKey, std::shared_ptr<ThemeConfig> themeConfig, 171 std::shared_ptr<ThemeConfig> themeConfig, const std::string &resTypeStr);
|
Completed in 3 milliseconds