mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 04:25:28 -04:00
js GetColorFromJs bugfix
Signed-off-by: chyyy0213 <chenhaiying3@huawei.com> Change-Id: Icea80da330e9c1bc0b1f613958cac6f6171f5451
This commit is contained in:
@@ -174,8 +174,8 @@ static uint32_t GetColorFromJs(NativeEngine& engine, NativeObject* jsObject,
|
||||
}
|
||||
WLOGFI("origin color: %{public}s", colorStr.c_str());
|
||||
std::string color = colorStr.substr(1);
|
||||
if (colorStr.length() == RGB_LENGTH) {
|
||||
colorStr = "FF" + colorStr; // ARGB
|
||||
if (color.length() == RGB_LENGTH) {
|
||||
color = "FF" + color; // ARGB
|
||||
}
|
||||
std::stringstream ss;
|
||||
uint32_t hexColor;
|
||||
|
||||
Reference in New Issue
Block a user