mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 17:21:11 +00:00
feat: support transparent for system app
Signed-off-by: Haryslee <lihao189@huawei.com>
This commit is contained in:
parent
fa817df27b
commit
dfd8a15d18
@ -756,4 +756,9 @@ bool SecurityComponentHandler::LoadSecurityComponentService()
|
||||
{
|
||||
return SecCompKit::LoadService();
|
||||
}
|
||||
|
||||
bool SecurityComponentHandler::IsSystemAppCalling()
|
||||
{
|
||||
return SecCompKit::IsSystemAppCalling();
|
||||
}
|
||||
} // namespace OHOS::Ace::NG
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
Security::SecurityComponent::OnFirstUseDialogCloseFunc&& callback);
|
||||
static bool IsSecurityComponentServiceExist();
|
||||
static bool LoadSecurityComponentService();
|
||||
static bool IsSystemAppCalling();
|
||||
|
||||
private:
|
||||
static bool CheckOpacity(const RefPtr<FrameNode>& node, const RefPtr<RenderContext>& renderContext);
|
||||
|
@ -25,6 +25,9 @@
|
||||
#include "core/components_ng/pattern/button/button_pattern.h"
|
||||
#include "core/components_ng/pattern/image/image_model_ng.h"
|
||||
#include "core/components_ng/pattern/image/image_pattern.h"
|
||||
#ifdef SECURITY_COMPONENT_ENABLE
|
||||
#include "core/components_ng/pattern/security_component/security_component_handler.h"
|
||||
#endif
|
||||
#include "core/components_ng/pattern/security_component/security_component_pattern.h"
|
||||
#include "core/components_ng/pattern/security_component/security_component_theme.h"
|
||||
#include "core/components_ng/pattern/text/text_pattern.h"
|
||||
@ -300,8 +303,12 @@ void SecurityComponentModelNG::SetBackgroundColor(const Color& value)
|
||||
return;
|
||||
}
|
||||
|
||||
bool res = false;
|
||||
#ifdef SECURITY_COMPONENT_ENABLE
|
||||
res = SecurityComponentHandler::IsSystemAppCalling();
|
||||
#endif
|
||||
Color resColor = value;
|
||||
if (!IsInReleaseList(resColor.GetValue()) && !IsArkuiComponent() && IsBelowThreshold(value)) {
|
||||
if (!res && !IsInReleaseList(resColor.GetValue()) && !IsArkuiComponent() && IsBelowThreshold(value)) {
|
||||
resColor = value.ChangeAlpha(FULL_TRANSPARENCY_VALUE);
|
||||
}
|
||||
ACE_UPDATE_PAINT_PROPERTY(SecurityComponentPaintProperty, BackgroundColor, resColor);
|
||||
|
@ -101,6 +101,11 @@ public:
|
||||
{
|
||||
return true;
|
||||
};
|
||||
|
||||
static bool IsSystemAppCalling()
|
||||
{
|
||||
return false;
|
||||
};
|
||||
};
|
||||
} // namespace SecurityComponent
|
||||
} // namespace Security
|
||||
|
Loading…
Reference in New Issue
Block a user