1-调整部分UI组件

2-调整背景颜色为有限度透明

提醒:OpenCAX由于商标已经被注册,所以本软件即日起改名NXEA
This commit is contained in:
JackLee 2026-04-28 21:57:30 +08:00
parent 50bcf7b678
commit 45176b5d7e
66 changed files with 114 additions and 131 deletions

View File

@ -1,6 +1,6 @@
{ {
"app": { "app": {
"bundleName": "com.example.opencax", "bundleName": "com.example.nxea",
"vendor": "example", "vendor": "example",
"versionCode": 1000000, "versionCode": 1000000,
"versionName": "1.0.0", "versionName": "1.0.0",

View File

@ -2,7 +2,7 @@
"string": [ "string": [
{ {
"name": "app_name", "name": "app_name",
"value": "OpenCAX" "value": "NXEA"
} }
] ]
} }

1
README.md Normal file
View File

@ -0,0 +1 @@
OpenCAX由于商标已经被注册,所以本软件即日起改名NXEA

View File

@ -5,13 +5,13 @@
"name": "default", "name": "default",
"type": "HarmonyOS", "type": "HarmonyOS",
"material": { "material": {
"certpath": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.cer", "certpath": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.cer",
"keyAlias": "debugKey", "keyAlias": "debugKey",
"keyPassword": "0000001B3A77593550E08B545C9DBACCC59B3C15B073167C67ECEF2B8B6B92A7FB893F9EF12C0B46F27F1D", "keyPassword": "0000001AA30759760D9D5D17A91BFB7147D9F271378B6316F13E50379FF23A4CF9A209064CA81F434E86",
"profile": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.p7b", "profile": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.p7b",
"signAlg": "SHA256withECDSA", "signAlg": "SHA256withECDSA",
"storeFile": "C:\\Users\\JackLee\\.ohos\\config\\default_OpenCAX_IBQbNZG6W5V0zTmQxRPojupy-F1gTlaQ6msiMPu4JRM=.p12", "storeFile": "C:\\Users\\JackLee\\.ohos\\config\\default_NXEA_0s33e8rF_-eDfV9W_2q2am8R5niF3V4xhQxkUtRtaC0=.p12",
"storePassword": "0000001BA261C4B798064E9B27EDF1ABE90DCBB63F196BE8922529410D84879CD4436A14ADCC49F3E6248D" "storePassword": "0000001A54288F3ED33A493359C0F43F9FDBB746AC483C30B3CCC3CDCD726910AFD3190EDD7ABC9D16BE"
} }
} }
], ],

View File

@ -6,13 +6,13 @@
"lockfileVersion": 3, "lockfileVersion": 3,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": { "specifiers": {
"libopencax.so@src/main/cpp/types/libopencax": "libopencax.so@src/main/cpp/types/libopencax" "libnxea.so@src/main/cpp/types/libnxea": "libnxea.so@src/main/cpp/types/libnxea"
}, },
"packages": { "packages": {
"libopencax.so@src/main/cpp/types/libopencax": { "libnxea.so@src/main/cpp/types/libnxea": {
"name": "libopencax.so", "name": "libnxea.so",
"version": "1.0.0", "version": "1.0.0",
"resolved": "src/main/cpp/types/libopencax", "resolved": "src/main/cpp/types/libnxea",
"registryType": "local" "registryType": "local"
} }
} }

View File

@ -6,6 +6,6 @@
"author": "", "author": "",
"license": "", "license": "",
"dependencies": { "dependencies": {
"libopencax.so": "file:./src/main/cpp/types/libopencax" "libnxea.so": "file:./src/main/cpp/types/libnxea"
} }
} }

View File

@ -1,6 +1,6 @@
# the minimum version of CMake. # the minimum version of CMake.
cmake_minimum_required(VERSION 3.18.1) cmake_minimum_required(VERSION 3.18.1)
project(opencax) project(nxea)
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DOHOS_PLATFORM) add_definitions(-DOHOS_PLATFORM)
@ -43,7 +43,7 @@ foreach(LIB_NAME ${OCCT_3RD_LIBS})
endforeach() endforeach()
# #
add_library(opencax SHARED add_library(nxea SHARED
napi_init.cpp napi_init.cpp
# Header # Header
NativeEGLOCCT/EGLMgr/EGLCore.h NativeEGLOCCT/EGLMgr/EGLCore.h
@ -95,8 +95,8 @@ set(SYSTEM_LIBS
) )
# #
target_link_libraries(opencax PUBLIC ${SYSTEM_LIBS}) target_link_libraries(nxea PUBLIC ${SYSTEM_LIBS})
target_link_libraries(opencax PUBLIC target_link_libraries(nxea PUBLIC
# EGL Hilog # EGL Hilog
${EGL-lib} ${EGL-lib}
${GLES-lib} ${GLES-lib}

View File

@ -10,7 +10,7 @@
#define NATIVE_TAG "EGLCore" #define NATIVE_TAG "EGLCore"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
// 配置EGL // 配置EGL
EGLint cfgAttribs[] = { EGLint cfgAttribs[] = {

View File

@ -10,7 +10,7 @@
#include "../common.h" #include "../common.h"
#include <EGL/egl.h> #include <EGL/egl.h>
namespace NativeOpenCAX { namespace NativeNXEA {
class EGLCore { class EGLCore {
public: public:
EGLCore(); EGLCore();

View File

@ -10,7 +10,7 @@
#define NATIVE_TAG "EGLSubCore" #define NATIVE_TAG "EGLSubCore"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
// 创建EGL context // 创建EGL context
EGLint ctxAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE}; EGLint ctxAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE};

View File

@ -11,7 +11,7 @@
#include <EGL/egl.h> #include <EGL/egl.h>
#include <GLES3/gl3.h> #include <GLES3/gl3.h>
#include <native_window/external_window.h> #include <native_window/external_window.h>
namespace NativeOpenCAX { namespace NativeNXEA {
class EGLSubCore { class EGLSubCore {
public: public:

View File

@ -20,7 +20,7 @@
#endif #endif
#include "arkui/ui_input_event.h" #include "arkui/ui_input_event.h"
namespace NativeOpenCAX { namespace NativeNXEA {
// [Start plugin_manager_cpp] // [Start plugin_manager_cpp]
// plugin_manager.cpp // plugin_manager.cpp
std::unordered_map<std::string, ArkUI_NodeHandle> NativeMgr::nodeHandleMap_; std::unordered_map<std::string, ArkUI_NodeHandle> NativeMgr::nodeHandleMap_;

View File

@ -32,7 +32,7 @@
#include <arkui/native_node.h> #include <arkui/native_node.h>
#include <arkui/native_type.h> #include <arkui/native_type.h>
namespace NativeOpenCAX { namespace NativeNXEA {
constexpr const int ZERO_ARG = 0; constexpr const int ZERO_ARG = 0;
constexpr const int FIRST_ARG = 1; constexpr const int FIRST_ARG = 1;

View File

@ -9,7 +9,7 @@
#define NATIVE_TAG "OCCTMgr" #define NATIVE_TAG "OCCTMgr"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
OCCTMgr::OCCTMgr():eglCore(nullptr) OCCTMgr::OCCTMgr():eglCore(nullptr)
{ {

View File

@ -11,7 +11,7 @@
#include "../EGLMgr/EGLCore.h" #include "../EGLMgr/EGLCore.h"
#include "../EGLMgr/EGLSubCore.h" #include "../EGLMgr/EGLSubCore.h"
#include "RenderThread.h" #include "RenderThread.h"
namespace NativeOpenCAX { namespace NativeNXEA {
class OCCTMgr { class OCCTMgr {

View File

@ -8,7 +8,7 @@
#endif #endif
static std::mutex renderMutex; static std::mutex renderMutex;
namespace NativeOpenCAX { namespace NativeNXEA {
Render::Render(int w, int h): Render::Render(int w, int h):
width(0), width(0),

View File

@ -25,7 +25,7 @@
#include "../ViewController/V3dViewController.h" #include "../ViewController/V3dViewController.h"
//TextLabel_Dev //TextLabel_Dev
#include <AIS_TextLabel.hxx> #include <AIS_TextLabel.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class Render { class Render {
public: public:

View File

@ -4,7 +4,7 @@
#include <cstdio> #include <cstdio>
#include <unistd.h> #include <unistd.h>
#include <hilog/log.h> #include <hilog/log.h>
namespace NativeOpenCAX { namespace NativeNXEA {
RenderThread::RenderThread() RenderThread::RenderThread()
: isRunning_(false) : isRunning_(false)

View File

@ -17,7 +17,7 @@
#include <AIS_TextLabel.hxx> #include <AIS_TextLabel.hxx>
#include <Resource_Unicode.hxx> #include <Resource_Unicode.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
struct ThreadInfo{ struct ThreadInfo{
int width; int width;

View File

@ -5,7 +5,7 @@
// please include "napi/native_api.h". // please include "napi/native_api.h".
#include "V3dViewController.h" #include "V3dViewController.h"
namespace NativeOpenCAX { namespace NativeNXEA {
V3dViewController::V3dViewController() V3dViewController::V3dViewController()
{ {

View File

@ -7,7 +7,7 @@
#ifndef OPENCAX_V3DVIEWCONTROLLER_H #ifndef OPENCAX_V3DVIEWCONTROLLER_H
#define OPENCAX_V3DVIEWCONTROLLER_H #define OPENCAX_V3DVIEWCONTROLLER_H
#include "AIS_ViewController.hxx" #include "AIS_ViewController.hxx"
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dViewController { class V3dViewController {
public: public:
V3dViewController(); V3dViewController();

View File

@ -10,7 +10,7 @@
#define NATIVE_TAG "CAMERA" #define NATIVE_TAG "CAMERA"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dCamera::V3dCamera() : camera(nullptr) {} V3dCamera::V3dCamera() : camera(nullptr) {}
V3dCamera::~V3dCamera() {} V3dCamera::~V3dCamera() {}

View File

@ -10,7 +10,7 @@
#include <V3d_View.hxx> #include <V3d_View.hxx>
#include <Graphic3d_Camera.hxx> #include <Graphic3d_Camera.hxx>
#include <gp_Quaternion.hxx> #include <gp_Quaternion.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dCamera{ class V3dCamera{
public: public:

View File

@ -10,7 +10,7 @@
#define NATIVE_TAG "CTX" #define NATIVE_TAG "CTX"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dCtx::V3dCtx(): V3dCtx::V3dCtx():
ctx(nullptr) ctx(nullptr)

View File

@ -14,7 +14,7 @@
#include "../Drawer/V3dDrawer.h" #include "../Drawer/V3dDrawer.h"
namespace NativeOpenCAX{ namespace NativeNXEA{
class V3dCtx{ class V3dCtx{
public: public:

View File

@ -7,7 +7,7 @@
#define NATIVE_TAG "V3DDRAWER" #define NATIVE_TAG "V3DDRAWER"
#endif #endif
#include "V3dDrawer.h" #include "V3dDrawer.h"
namespace NativeOpenCAX { namespace NativeNXEA {
V3dDrawer::V3dDrawer() : V3dDrawer::V3dDrawer() :
drawer(nullptr), drawer(nullptr),

View File

@ -20,7 +20,7 @@
#include <Prs3d_DatumAspect.hxx> #include <Prs3d_DatumAspect.hxx>
#include <Prs3d_DimensionAspect.hxx> #include <Prs3d_DimensionAspect.hxx>
namespace NativeOpenCAX{ namespace NativeNXEA{
class V3dDrawer { class V3dDrawer {
public: public:

View File

@ -10,7 +10,7 @@
#define NATIVE_TAG "GRAPHIC_DRIVER" #define NATIVE_TAG "GRAPHIC_DRIVER"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dOGD::V3dOGD() : graphicDriver(nullptr), displayConnection(nullptr) {} V3dOGD::V3dOGD() : graphicDriver(nullptr), displayConnection(nullptr) {}
V3dOGD::~V3dOGD() {} V3dOGD::~V3dOGD() {}

View File

@ -12,7 +12,7 @@
#include <OpenGl_GraphicDriver.hxx> #include <OpenGl_GraphicDriver.hxx>
#include <Graphic3d_GraphicDriver.hxx> #include <Graphic3d_GraphicDriver.hxx>
namespace NativeOpenCAX{ namespace NativeNXEA{
class V3dOGD{ class V3dOGD{
public: public:
V3dOGD(); V3dOGD();

View File

@ -9,7 +9,7 @@
#ifndef NATIVE_TAG #ifndef NATIVE_TAG
#define NATIVE_TAG "V3DTRI" #define NATIVE_TAG "V3DTRI"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dTri::V3dTri(): V3dTri::V3dTri():
axiPlam(nullptr), axiPlam(nullptr),

View File

@ -10,7 +10,7 @@
#include <AIS_Trihedron.hxx> #include <AIS_Trihedron.hxx>
#include <AIS_InteractiveContext.hxx> #include <AIS_InteractiveContext.hxx>
#include <Geom_Axis2Placement.hxx> #include <Geom_Axis2Placement.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dTri { class V3dTri {
public: public:

View File

@ -10,7 +10,7 @@
#ifndef NATIVE_TAG #ifndef NATIVE_TAG
#define NATIVE_TAG "V3DTRICUBE" #define NATIVE_TAG "V3DTRICUBE"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dTriCube::V3dTriCube(): V3dTriCube::V3dTriCube():
triCube(nullptr) triCube(nullptr)

View File

@ -12,7 +12,7 @@
#include <Graphic3d_TransformPers.hxx> #include <Graphic3d_TransformPers.hxx>
#include <AIS_ViewCube.hxx> #include <AIS_ViewCube.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dTriCube { class V3dTriCube {
public: public:

View File

@ -9,7 +9,7 @@
#ifndef NATIVE_TAG #ifndef NATIVE_TAG
#define NATIVE_TAG "V3DWCSTRI" #define NATIVE_TAG "V3DWCSTRI"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dWCSTri::V3dWCSTri() V3dWCSTri::V3dWCSTri()
{ {

View File

@ -10,7 +10,7 @@
#include <AIS_Trihedron.hxx> #include <AIS_Trihedron.hxx>
#include <AIS_InteractiveContext.hxx> #include <AIS_InteractiveContext.hxx>
#include <Geom_Axis2Placement.hxx> #include <Geom_Axis2Placement.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dWCSTri { class V3dWCSTri {
public: public:

View File

@ -13,7 +13,7 @@
#define NATIVE_TAG "VIEW" #define NATIVE_TAG "VIEW"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dView::V3dView() : view(nullptr) {} V3dView::V3dView() : view(nullptr) {}
V3dView::~V3dView() {} V3dView::~V3dView() {}

View File

@ -14,7 +14,7 @@
#include <AIS_AnimationCamera.hxx> #include <AIS_AnimationCamera.hxx>
#include <V3d.hxx> #include <V3d.hxx>
namespace NativeOpenCAX{ namespace NativeNXEA{
class V3dView{ class V3dView{
public: public:

View File

@ -11,7 +11,7 @@
#endif #endif
#include <V3d_DirectionalLight.hxx> #include <V3d_DirectionalLight.hxx>
#include <V3d_AmbientLight.hxx> #include <V3d_AmbientLight.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
V3dViewer::V3dViewer() : viewer(nullptr) {} V3dViewer::V3dViewer() : viewer(nullptr) {}
V3dViewer::~V3dViewer() {} V3dViewer::~V3dViewer() {}

View File

@ -12,7 +12,7 @@
#include <V3d_Viewer.hxx> #include <V3d_Viewer.hxx>
#include <OpenGl_GraphicDriver.hxx> #include <OpenGl_GraphicDriver.hxx>
namespace NativeOpenCAX{ namespace NativeNXEA{
class V3dViewer{ class V3dViewer{
public: public:

View File

@ -8,7 +8,7 @@
#ifndef NATIVE_TAG #ifndef NATIVE_TAG
#define NATIVE_TAG "WINDOW" #define NATIVE_TAG "WINDOW"
#endif #endif
namespace NativeOpenCAX { namespace NativeNXEA {
V3dWin::V3dWin():win(nullptr){ V3dWin::V3dWin():win(nullptr){

View File

@ -10,7 +10,7 @@
#include "NativeEGLOCCT/common.h" #include "NativeEGLOCCT/common.h"
#include <Aspect_NeutralWindow.hxx> #include <Aspect_NeutralWindow.hxx>
namespace NativeOpenCAX { namespace NativeNXEA {
class V3dWin { class V3dWin {
public: public:

View File

@ -3,7 +3,7 @@
#include "NativeEGLOCCT/common.h" #include "NativeEGLOCCT/common.h"
#include "NativeEGLOCCT/NativeMgr.h" #include "NativeEGLOCCT/NativeMgr.h"
namespace NativeOpenCAX { namespace NativeNXEA {
EXTERN_C_START EXTERN_C_START
static napi_value Init(napi_env env, napi_value exports) { static napi_value Init(napi_env env, napi_value exports) {
OH_LOG_Print(LOG_APP, LOG_INFO, LOG_PRINT_DOMAIN, "Init", "Init begins"); OH_LOG_Print(LOG_APP, LOG_INFO, LOG_PRINT_DOMAIN, "Init", "Init begins");
@ -31,18 +31,18 @@ static napi_value Init(napi_env env, napi_value exports) {
EXTERN_C_END EXTERN_C_END
// 编写接口的描述信息,根据实际需要可以修改对应参数 // 编写接口的描述信息,根据实际需要可以修改对应参数
static napi_module OpenCAXModel = { static napi_module NXEAModel = {
.nm_version = 1, .nm_version = 1,
.nm_flags = 0, .nm_flags = 0,
.nm_filename = nullptr, .nm_filename = nullptr,
.nm_register_func = Init, .nm_register_func = Init,
.nm_modname = "opencax", .nm_modname = "nxea",
.nm_priv = ((void*)0), .nm_priv = ((void*)0),
.reserved = { 0 } .reserved = { 0 }
}; };
} }
extern "C" __attribute__((constructor)) extern "C" __attribute__((constructor))
void RegisterOpenCAXModule(void) void RegisterNXEAModule(void)
{ {
napi_module_register(&NativeOpenCAX::OpenCAXModel); napi_module_register(&NativeNXEA::NXEAModel);
} }

View File

@ -1,4 +1,4 @@
export interface NativeXOpenCAX { export interface NativeNXEA {
setFrameRate(nodeId: string, min: number, max: number, expected: number): void; setFrameRate(nodeId: string, min: number, max: number, expected: number): void;
setNeedSoftKeyboard(nodeId: string, need: boolean): void; setNeedSoftKeyboard(nodeId: string, need: boolean): void;
} }

View File

@ -1,5 +1,5 @@
{ {
"name": "libopencax.so", "name": "libnxea.so",
"types": "./Index.d.ts", "types": "./Index.d.ts",
"version": "1.0.0", "version": "1.0.0",
"description": "Please describe the basic information." "description": "Please describe the basic information."

View File

@ -34,6 +34,12 @@ function SetWinSize (width:number,height:number){
console.error(`MainWindow SetWinSize Error: win is nullptr!`); console.error(`MainWindow SetWinSize Error: win is nullptr!`);
} }
} }
function SetBackgroundColor(){
if(mdwInfo.win){
mdwInfo.win.setWindowBackgroundColor('#B3FFFFFF');
mdwInfo.win.setWindowContainerColor('#B3FFFFFF', '#FFFFFFFF');
}
}
//窗口的事件监听 //窗口的事件监听
function InitWinEventHub(ctx:common.UIAbilityContext){ function InitWinEventHub(ctx:common.UIAbilityContext){
if(mdwInfo.win==undefined||mdwInfo.winStage==undefined){ if(mdwInfo.win==undefined||mdwInfo.winStage==undefined){
@ -63,13 +69,14 @@ export function InitLoadInfoPage(){
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
return; return;
} }
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
SetDisplayPosition((mdwInfo.displayWidth-InfoWinMargin[0])/4.16,(mdwInfo.displayHeight-InfoWinMargin[1])/4.16);
SetBackgroundColor();
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
}); });
}else{ }else{
console.error(`InitLoadInfoPage winStage Error: win is nullptr!`); console.error(`InitLoadInfoPage winStage Error: win is nullptr!`);
} }
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
SetDisplayPosition((mdwInfo.displayWidth-InfoWinMargin[0])/4.16,(mdwInfo.displayHeight-InfoWinMargin[1])/4.16);
} }
//WinStage加载软件Info页面 //WinStage加载软件Info页面
export function InitLoadMainPage(rType:LoadPageType){ export function InitLoadMainPage(rType:LoadPageType){
@ -81,6 +88,11 @@ export function InitLoadMainPage(rType:LoadPageType){
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
return; return;
} }
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
SetBackgroundColor();
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
}); });
}else{ }else{
@ -93,6 +105,11 @@ export function InitLoadMainPage(rType:LoadPageType){
hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); hilog.error(DOMAIN, 'Tag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err));
return; return;
} }
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
SetBackgroundColor();
hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.');
}); });
mdwInfo.win.showWindow(); mdwInfo.win.showWindow();
@ -100,10 +117,6 @@ export function InitLoadMainPage(rType:LoadPageType){
console.error(`InitLoadInfoPage winStage Error: win is nullptr!`); console.error(`InitLoadInfoPage winStage Error: win is nullptr!`);
} }
} }
mdwInfo.winWidth=mdwInfo.displayWidth-MainWinMargin[0];
mdwInfo.winHeight=mdwInfo.displayHeight-MainWinMargin[1]*2;
SetWinSize(mdwInfo.winWidth,mdwInfo.winHeight)
SetDisplayPosition(MainWinMargin[0]/2,MainWinMargin[1]/2);
} }
//初始化显示信息页面 //初始化显示信息页面
@ -116,7 +129,6 @@ export function InitInfoWindow(winStage: window.WindowStage,ctx:common.UIAbility
} }
InitGlobalDWI(winStage); InitGlobalDWI(winStage);
InitLoadInfoPage(); InitLoadInfoPage();
//InitLoadMainPage(LoadPageType.STAGE)
InitWinEventHub(ctx); InitWinEventHub(ctx);
}); });
} }

View File

@ -70,8 +70,8 @@ struct Index {
//OpenCAX主界面整体布局,采用多行布局 //OpenCAX主界面整体布局,采用多行布局
Column() { Column() {
//头部导航功能区 //头部导航功能区
//Blank().height(uiMode.state?'15%':'0%') Blank().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0) //TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
//分割线 //分割线
Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey) Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey)
//工具栏 //工具栏
@ -116,11 +116,9 @@ struct Index {
}.width('100%') }.width('100%')
.justifyContent(FlexAlign.Start) .justifyContent(FlexAlign.Start)
.height(mdwInfo.displayHeight*0.02) .height(mdwInfo.displayHeight*0.02)
.backgroundColor(Color.Transparent)
} }
// TitleTab() TitleTab().height(uiMode.state?mdwInfo.displayHeight*0.07:0)
// .height(uiMode.state?'15%':'0%')
// .backgroundColor(Color.Transparent)
// .backgroundBlurStyle(BlurStyle.Thin, { colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
}.width('100%') }.width('100%')
.height('100%') .height('100%')

View File

@ -4,9 +4,9 @@ import { common } from '@kit.AbilityKit';
import { SWInfo } from './subpages/info/SWInfo'; import { SWInfo } from './subpages/info/SWInfo';
import { SWSrc } from './subpages/info/SWSrc'; import { SWSrc } from './subpages/info/SWSrc';
import { SWEnv } from './subpages/info/SWEnv'; import { SWEnv } from './subpages/info/SWEnv';
import { SegmentButtonV2Items,TabSegmentButtonV2 } from '@kit.ArkUI';
const TabsBarStr:Array<string>=['运行检测','软件介绍','更新日志','开源信息','关于']
@Entry @Entry
@ComponentV2 @ComponentV2
struct Info { struct Info {
@ -14,53 +14,23 @@ struct Info {
private titleBarTabs: TabsController = new TabsController(); private titleBarTabs: TabsController = new TabsController();
//当前的顶部导航选择页 //当前的顶部导航选择页
@Local selectedIndex: number = 0; // 当前选中的索引 @Local selectedIndex: number = 0; // 当前选中的索引
@Local textItems: SegmentButtonV2Items = new SegmentButtonV2Items([
{ text: '运行检测' },
{ text: '软件介绍' },
{ text: '更新日志' },
{ text: '开源信息' },
{ text: '关于' },
]);
build() { build() {
Flex({ direction: FlexDirection.Column }){ Flex({ direction: FlexDirection.Column }){
Scroll() { Row(){
Row({space:0}) {
Blank().layoutWeight(1) Blank().layoutWeight(1)
ForEach(TabsBarStr, (item: string, index: number) => { TabSegmentButtonV2({
Button(){ items: this.textItems,
Column(){ selectedIndex: this.selectedIndex!!,
Text(item) }).width('60%')
.height('95%')
.fontSize(index === this.selectedIndex ? 20 : 16)
.fontWeight(index === this.selectedIndex ? FontWeight.Bold : FontWeight.Normal)
.backgroundColor(Color.Transparent)
Divider()
.height('5%')
.vertical(false)
.strokeWidth(2)
.lineCap(LineCapStyle.Round)
.color(Color.Grey)
.align(Alignment.Top)
.visibility(index === this.selectedIndex?Visibility.Visible:Visibility.Hidden)
}.width('100%')
.height('100%')
}
.width('7%')
.backgroundColor(index === this.selectedIndex ? $r('sys.color.container_modal_button_normal_baseboard') : Color.Transparent)
.type(ButtonType.Normal)
.onClick(() => {
this.titleBarTabs.changeIndex(index);
this.selectedIndex = index;
})
})
Blank().layoutWeight(1) Blank().layoutWeight(1)
} }.margin({ top: '1%'})
}
.height('5%')
.align(Alignment.Center)
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.margin({ top: 0,left:0,bottom:0,right:0})
//分割线
Divider()
.vertical(false)
.strokeWidth(1)
.lineCap(LineCapStyle.Round)
.width('100%')
.backgroundColor(Color.Grey)
Tabs({barPosition: BarPosition.Start, index: this.selectedIndex,controller: this.titleBarTabs}){ Tabs({barPosition: BarPosition.Start, index: this.selectedIndex,controller: this.titleBarTabs}){
TabContent() { TabContent() {
@ -90,7 +60,7 @@ struct Info {
console.info('Checkbox1 change is'+ value); console.info('Checkbox1 change is'+ value);
}) })
Text('下次启动不再显示').fontSize(18) Text('下次启动不再显示').fontSize(18)
Button('确定') Button('确定', { buttonStyle: ButtonStyleMode.NORMAL, role: ButtonRole.NORMAL })
.onClick(()=>{ .onClick(()=>{
let ctx=this.getUIContext().getHostContext() as common.UIAbilityContext; let ctx=this.getUIContext().getHostContext() as common.UIAbilityContext;
ctx.eventHub.emit('EMIT_LOADMAINPAGE',LoadPageType.STAGE) ctx.eventHub.emit('EMIT_LOADMAINPAGE',LoadPageType.STAGE)
@ -98,6 +68,8 @@ struct Info {
Blank().layoutWeight(1) Blank().layoutWeight(1)
}.height('5%') }.height('5%')
.justifyContent(FlexAlign.Center) .justifyContent(FlexAlign.Center)
}.margin({ top:'1%', left: 0, bottom: '1%', right:0 }) .margin({ bottom: '1%'})
}.width('100%')
.height('100%')
} }
} }

View File

@ -4,7 +4,7 @@ import { mdwInfo } from '../dispwininfo/DispWinInfo';
import { window } from '@kit.ArkUI'; import { window } from '@kit.ArkUI';
import { common, StartOptions,Want } from "@kit.AbilityKit"; import { common, StartOptions,Want } from "@kit.AbilityKit";
import { picker } from '@kit.CoreFileKit'; import { picker } from '@kit.CoreFileKit';
import NativeOpenCAX from 'libopencax.so'; import NativeOpenCAX from 'libnxea.so';
import {EventSubAbility} from './EventSubAbility' import {EventSubAbility} from './EventSubAbility'
import { import {

View File

@ -7,7 +7,7 @@ import { SubWinInfo } from "./EventBase";
export async function EventSubAbility(winInfo:SubWinInfo): Promise<boolean>{ export async function EventSubAbility(winInfo:SubWinInfo): Promise<boolean>{
let ctx = mdwInfo.win?.getUIContext().getHostContext() as common.UIAbilityContext; let ctx = mdwInfo.win?.getUIContext().getHostContext() as common.UIAbilityContext;
let want: Want = { let want: Want = {
bundleName: 'com.example.opencax', bundleName: 'com.example.nxea',
abilityName: 'SubAbility', abilityName: 'SubAbility',
parameters: { parameters: {
instanceKey: winInfo.subEventName as string instanceKey: winInfo.subEventName as string

View File

@ -1,6 +1,6 @@
import { AppStorageV2, NodeContent } from "@kit.ArkUI"; import { AppStorageV2, NodeContent } from "@kit.ArkUI";
import {RndId} from './EventBase' import {RndId} from './EventBase'
import NativeOpenCAX from 'libopencax.so'; import NativeOpenCAX from 'libnxea.so';
@ObservedV2 @ObservedV2
export class XCompInfo{ export class XCompInfo{

View File

@ -10,7 +10,7 @@ import {
import { import {
FreeWinMode, FreeWinMode,
ExtractFonts ExtractFonts
} from '../../initEvent/InitEnv'; } from '../../initevent/InitEnv';
export let DisplayMode:Array<TitleButton>=[ export let DisplayMode:Array<TitleButton>=[
{btnModel:[ModelType.BASE],btnName:"横屏",btnNamed:"",btnIcon:"",btnTips:"横屏",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}}, {btnModel:[ModelType.BASE],btnName:"横屏",btnNamed:"",btnIcon:"",btnTips:"横屏",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
@ -85,6 +85,7 @@ export struct SWEnv {
Text('状态:') Text('状态:')
Checkbox().select(this.drivceState); Checkbox().select(this.drivceState);
}.height('10%') }.height('10%')
Row(){ Row(){
TextComboBox({name:'屏幕支持方向:',menu:DisplayMode}) TextComboBox({name:'屏幕支持方向:',menu:DisplayMode})
Blank().layoutWeight(1) Blank().layoutWeight(1)
@ -93,6 +94,7 @@ export struct SWEnv {
Text('状态:') Text('状态:')
Checkbox().select(this.winOriState); Checkbox().select(this.winOriState);
}.height('10%') }.height('10%')
Row(){ Row(){
Text('沙箱字体状态:') Text('沙箱字体状态:')
Blank().layoutWeight(1) Blank().layoutWeight(1)

View File

@ -20,7 +20,7 @@ export struct SWSrc {
.height('30%') .height('30%')
Column(){ Column(){
TextArea({ TextArea({
text: '源码开源地址:http://git.axibug.com/JackLee/OpenCAX.git \n ' + text: '源码开源地址:http://git.axibug.com/JackLee/NXEA.git \n ' +
'开源麻本质就是一种抄所以大家一起抄.正所谓你不抄我不抄项目怎么交 \n' + '开源麻本质就是一种抄所以大家一起抄.正所谓你不抄我不抄项目怎么交 \n' +
'一杯茶,一包烟,一行代码写一天,上午写,中午改,晚上调又调 \n'+ '一杯茶,一包烟,一行代码写一天,上午写,中午改,晚上调又调 \n'+
'东借借,西看看,月薪指定能过万 \n', '东借借,西看看,月薪指定能过万 \n',

View File

@ -69,7 +69,6 @@ export struct TitleColumnSub {
Blank().layoutWeight(1) Blank().layoutWeight(1)
}.width('100%') }.width('100%')
.height('100%') .height('100%')
.backgroundBlurStyle(BlurStyle.Thin, .backgroundColor(Color.Transparent)
{ colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
} }
} }

View File

@ -84,7 +84,6 @@ export struct TitleTab {
.barHeight(0) .barHeight(0)
.barMode(BarMode.Fixed) .barMode(BarMode.Fixed)
}.margin({ top:0, left: 0, bottom: 0, right: 0 }) }.margin({ top:0, left: 0, bottom: 0, right: 0 })
.backgroundBlurStyle(BlurStyle.Thin, .backgroundColor(Color.Transparent)
{ colorMode: ThemeColorMode.LIGHT, adaptiveColor: AdaptiveColor.DEFAULT, scale: 1.0 })
} }
} }

View File

@ -17,7 +17,7 @@
"name": "ohos.permission.INPUT_MONITORING" "name": "ohos.permission.INPUT_MONITORING"
}, },
{ {
"name": "ohos.permission.SET_WINDOW_TRANSPARENT" 'name': "ohos.permission.SET_WINDOW_TRANSPARENT"
} }
], ],
"abilities": [ "abilities": [

View File

@ -10,7 +10,7 @@
}, },
{ {
"name": "EntryAbility_label", "name": "EntryAbility_label",
"value": "OpenCAX" "value": "NXEA"
} }
] ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 116 KiB

BIN
image/background.xcf Normal file

Binary file not shown.

BIN
image/icon.xcf Normal file

Binary file not shown.