修改整体软件界面背景颜色

This commit is contained in:
JackLee 2026-03-19 23:32:26 +08:00
parent e0d893216f
commit 322156acde
10 changed files with 32 additions and 28 deletions

View File

@ -44,7 +44,6 @@ export struct EventBtn {
}
}
//仅仅用于模块切换
@ComponentV2
export struct SwitchModelBtn {

View File

@ -23,7 +23,7 @@ struct Index {
.height(this.mwInfo.mainWindowHeight * 0.1)
.borderRadius(5)
//分割线
Divider().vertical(false).strokeWidth(2).color(0x000000).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Gray)
Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey)
//工具栏
Row() {
TitleColumnSub();
@ -32,12 +32,12 @@ struct Index {
.height(this.mwInfo.mainWindowHeight * 0.03)
.align(Alignment.Start)
//分割线
Divider().vertical(false).strokeWidth(2).color(0x000000).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Gray)
Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey)
Row() {
//左侧边导航区
LeftSideTab()
// 拖拽手柄
Divider().vertical(true).strokeWidth(3).color(0x000000).lineCap(LineCapStyle.Round).height('100%').backgroundColor(Color.Gray)
Divider().vertical(true).strokeWidth(3).lineCap(LineCapStyle.Round).height('100%').backgroundColor(Color.Grey)
.onMouse((event) => {
if(event.button==MouseButton.Left&&event.action==MouseAction.Press){
this.startX = event.screenX; // 记录起始坐标
@ -62,13 +62,14 @@ struct Index {
}.width('100%')
.height(this.mwInfo.mainWindowHeight * 0.36)
//分割线
Divider().vertical(false).strokeWidth(2).color(0x000000).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Gray)
Divider().vertical(false).strokeWidth(1).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Grey)
///状态栏
Column() {
Text('状态栏')
}.width('100%')
.height(this.mwInfo.mainWindowHeight * 0.05)
}.width('100%')
}.backgroundColor('#f3f3f0')
.width('100%')
.height('100%')
}
}

View File

@ -4,10 +4,12 @@ import { DevModel, MatrixModel } from "./MatrixModel";
import { ModelType } from "./ModelType";
import { GroupOption } from "./GroupOption";
import { TitleModel } from "./TabContent";
import { FileModel } from "./FileModel";
//主页栏目布局数据
export let TitleMainPage:Array<TitleModel>=
[{cmName:'主页',cmPage:'',cmTips:'',cmEvents: [[[{grpName:'文件功能组',grpBtn:[
[
{cmName:'主页',cmPage:'',cmTips:'',cmEvents: [[[{grpName:'文件功能组',grpBtn:[
{eModel:[ModelType.BASE],eName:"新建",eNamed:"",ePage:'',eIcon:"base_new_file",eTips:"",eEvent:""},
{eModel:[ModelType.BASE],eName:"打开",eNamed:"",ePage:'',eIcon:"base_open_file",eTips:"",eEvent:""},
[

View File

@ -85,5 +85,6 @@ export struct LeftSideTab {
}
}.width(this.panelWidth)
}.width('auto')
.backgroundColor('#f3f3f0')
}
}

View File

@ -50,7 +50,6 @@ export struct TitleColumnSub {
.height(25)
.width(25)
.padding(1)
.backgroundColor(Color.Transparent)
.backgroundImage($r('app.media.base_shortcut_menu'))
.backgroundImagePosition({ x: '10%', y: '10%' })
.backgroundImageSize({
@ -99,14 +98,6 @@ export struct TitleColumnSub {
.backgroundImage($r('app.media.'+DisplayMode[0].eIcon))
.backgroundImageSize({ width: '100%', height: '100%' })
.bindMenu(this.DisplayModeMenu(DisplayMode))
// Button('创建并显示子窗口')
// .onClick(() => {
// this.createAndShowSubWindow();
// })
// Button('关闭子窗口')
// .onClick(() => {
// this.closeSubWindow();
// })
}.margin({ top: 1, left: 1, bottom: 1, right: 1 })
}

View File

@ -9,7 +9,7 @@ import { TitleButton } from '../LayoutInterface/Interface/ButtonInterface'
import { TitleGroup } from '../LayoutInterface/Interface/GroupInterface'
import {TitleTabContent} from './TitleTabContent'
import { MainWindowInfo } from '../AppStorageV2Class';
import { AppStorageV2 } from '@kit.ArkUI';
import { AppStorageV2, CommonModifier, TabTitleBar } from '@kit.ArkUI';
@Entry
@ComponentV2
@ -34,29 +34,32 @@ export struct TitleTab {
})
}
}
build() {
Flex({ direction: FlexDirection.Column }){
Scroll() {
Row({space:0}) {
Button(TitleData.mFileModel.cmName)
.fontSize(16)
.fontColor(Color.Black)
.height(this.mwInfo.mainWindowHeight*0.025)
.width(this.mwInfo.mainWindowWidth*0.035)
.bindMenu(this.FileMenu(TitleData.mFileModel.cmEvents as Array<TitleButton>))
.type(ButtonType.Normal)
.backgroundColor(Color.Brown)
.backgroundColor('#f3f3f0')
ForEach(this.curtModel, (item: TitleModel, index: number) => {
Button(item.cmName)
.fontSize(16)
.fontColor(Color.Black)
.fontWeight(index === this.titleBarFocusIndex ? FontWeight.Bold : FontWeight.Normal)
.height(this.mwInfo.mainWindowHeight*0.025)
.width(this.mwInfo.mainWindowWidth*0.035)
.type(ButtonType.Normal)
.backgroundColor(index === this.titleBarFocusIndex ? Color.Blue : Color.Brown)
.backgroundColor('#f3f3f0')
.onClick(() => {
this.titleBarTabs.changeIndex(index);
this.titleBarFocusIndex = index;
//this.currentModel=TitleData.mModels.get(index);
})
.onAxisEvent((event?: AxisEvent) => {
if (event?.hasAxis(AxisType.VERTICAL_AXIS)) {
@ -73,7 +76,13 @@ export struct TitleTab {
.margin({ top: 2,left:2,bottom:0,right:2})
.width('100%')
//分割线
Divider().vertical(false).strokeWidth(2).color(0x000000).lineCap(LineCapStyle.Round).width('100%').backgroundColor(Color.Gray)
Divider()
.vertical(false)
.strokeWidth(1)
.lineCap(LineCapStyle.Round)
.width('100%')
.backgroundColor(Color.Grey)
Tabs({barPosition: BarPosition.Start, index: this.titleBarDefaultFocusIndex,controller: this.titleBarTabs}){
ForEach(this.curtModel,(item:TitleModel, index: number)=>{
TabContent() {
@ -84,6 +93,5 @@ export struct TitleTab {
.barHeight(0)
.barMode(BarMode.Fixed)
}.width(this.mwInfo.mainWindowWidth)
.backgroundColor('#F8F9FA')
}
}

View File

@ -48,7 +48,7 @@ export struct TitleTabContent {
//功能组名
GroupTextEventMenu({grpEvent:group_item})
}.height(this.mwInfo.mainWindowHeight*0.073)
Divider().vertical(true).strokeWidth(2).color(0x000000).lineCap(LineCapStyle.Round).height('100%').backgroundColor(Color.Gray)
Divider().vertical(true).strokeWidth(1).lineCap(LineCapStyle.Round).height('95%').backgroundColor(Color.Gray)
})
}else{
//菜单按钮
@ -65,6 +65,6 @@ export struct TitleTabContent {
.align(Alignment.BottomEnd)
.borderColor(Color.Gray)
})
}.margin({ top: 1,left:1,bottom:1,right:1})
}.margin({ top: 5,left:1,bottom:1,right:1})
}
}

View File

@ -59,7 +59,7 @@ export struct ModelView {
Row(){
ContentSlot(this.nodeContent);
}.layoutWeight(1)
}
}.backgroundColor('#f3f3f0')
.width('100%')
.height('100%');
}

View File

@ -64,6 +64,8 @@ export struct ModelViewTab {
.height('auto')
.barMode(BarMode.Fixed)
}.borderWidth('1')
.borderColor(Color.Grey)
.height('auto')
.backgroundColor('#f3f3f0')
}
}