From 4f6192dfca98d4dc81fc252b25447120a8b1e190 Mon Sep 17 00:00:00 2001 From: yanjuntao Date: Mon, 9 May 2022 17:11:39 +0800 Subject: [PATCH 1/3] fix ux design Signed-off-by: yanjuntao --- .../src/main/ets/components/CusDialogComp.ets | 4 ++- .../components/NoteContentCompPortrait.ets | 8 +++++- .../src/main/ets/components/NoteListComp.ets | 27 ++++++++++--------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/common/component/src/main/ets/components/CusDialogComp.ets b/common/component/src/main/ets/components/CusDialogComp.ets index d4f1f59..8d7b16e 100644 --- a/common/component/src/main/ets/components/CusDialogComp.ets +++ b/common/component/src/main/ets/components/CusDialogComp.ets @@ -277,6 +277,7 @@ struct NoteDataMoveItemComp { .maxLines(1) .textOverflow({ overflow: TextOverflow.Ellipsis }) .flexShrink(1) + .fontWeight(FontWeight.Medium) Image((FolderUtil.getCommonFolder(this.AllFolderArray, this.CheckedNoteArray) == null || FolderUtil.getCommonFolder(this.AllFolderArray, this.CheckedNoteArray) != this.folderItem) ? $r("app.media.foldMove_unselect") : $r("app.media.foldMove_select")) .objectFit(ImageFit.Fill) @@ -320,6 +321,7 @@ export struct NoteDataMoveDialog { Text($r("app.string.chooseFolder")) .fontSize(20) .fontWeight(600) + .fontWeight(FontWeight.Medium) }.height(56) .width(288) @@ -703,7 +705,7 @@ export struct EditContentDialogPortrait { Text($r("app.string.style")).margin({ top: 8 }) .fontSize(14).fontColor($r("app.color.font_stylecolor_AD182431")) - Image($r('app.media.cross')).height(16).width(16).margin({ top: 8 }) + Image($r('app.media.cross')).height(16).width(16).margin({ top: 8 }).fillColor($r("app.color.font_stylecolor_AD182431")) .onClick(() => { this.editContentDialogCtl.close() }) diff --git a/common/component/src/main/ets/components/NoteContentCompPortrait.ets b/common/component/src/main/ets/components/NoteContentCompPortrait.ets index b6c0716..b947269 100644 --- a/common/component/src/main/ets/components/NoteContentCompPortrait.ets +++ b/common/component/src/main/ets/components/NoteContentCompPortrait.ets @@ -208,7 +208,7 @@ export struct NoteContentOverViewComp { Flex({ direction: FlexDirection.Column, wrap: FlexWrap.NoWrap, justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Row() { - Text(this.selectedNoteData.title).fontSize(30) + Text(this.selectedNoteData.title).fontSize(30).fontWeight(FontWeight.Medium) .onClick(() => { this.editTitleDialogCtl.open() }) @@ -381,6 +381,9 @@ export struct DeleteNoteComp { .fontColor($r('app.color.delete_font_color')) .padding({ top: 5 }) } + .height("100%") + .width(180) + .justifyContent(FlexAlign.Center) .alignItems(HorizontalAlign.Center) Column() { @@ -403,6 +406,9 @@ export struct DeleteNoteComp { .fontColor($r('app.color.recover_font_color')) .padding({ top: 5 }) } + .height("100%") + .width(180) + .justifyContent(FlexAlign.Center) .alignItems(HorizontalAlign.Center) } .width(360) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index 6669164..dda8647 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -156,6 +156,7 @@ struct NoteOverViewComp { .fontColor($r("app.color.note_selected_font_color")) .margin({ left: 16 }) .textOverflow({ overflow: TextOverflow.Ellipsis }) + .fontWeight(FontWeight.Medium) }.alignItems(VerticalAlign.Center) .visibility(this.longpress ? Visibility.Visible : Visibility.None) }.padding({ top: 8, bottom: 8 }) @@ -373,16 +374,6 @@ export struct NoteItemListComp { .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) Stack() { - Flex({ justifyContent: FlexAlign.Center }) { - Text($r("app.string.permanently_delete_tips")) - .fontSize(12) - .fontColor($r("app.color.Recently_delete_prompt_font_color")) - } - .padding({ bottom: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 12 : 0 }) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - .width('100%') - .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.Visible : Visibility.None) - Column() { List({ initialIndex: 0 }) { ListItem() { @@ -401,6 +392,16 @@ export struct NoteItemListComp { .padding({ bottom: 120 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.Visible : Visibility.None) + ListItem() { + Text($r("app.string.permanently_delete_tips")) + .fontSize(12) + .fontColor($r("app.color.Recently_delete_prompt_font_color")) + } + .padding({ bottom: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 12 : 0 }) + .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) + .width('100%') + .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes && this.search == false ? Visibility.Visible : Visibility.None) + ForEach(this.inputKeyword.length == 0 ? NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) : this.searchResultList, (noteItem) => { ListItem() { @@ -838,7 +839,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width("25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -897,7 +898,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width("25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -926,7 +927,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width("25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") .height("100%") .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) -- Gitee From 6939afd8803a05258e317516fed368fcf2135901 Mon Sep 17 00:00:00 2001 From: yanjuntao Date: Tue, 10 May 2022 11:12:03 +0800 Subject: [PATCH 2/3] fix function bar margins Signed-off-by: yanjuntao --- common/component/src/main/ets/components/NoteListComp.ets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index dda8647..6f114f1 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -839,7 +839,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -898,7 +898,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .opacity(this.greyOpacity ? 0.4 : 1) .enabled(this.greyOpacity ? false : true) @@ -927,7 +927,7 @@ export struct OperateNoteCompForPortrait { .padding({ top: 5 }) } .backgroundColor($r('app.color.notelist_bgcolor_f1f3f5')) - .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? "33.3%" :"25%") + .width(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes? 120 :"25%") .height("100%") .alignItems(HorizontalAlign.Center) .justifyContent(FlexAlign.Center) -- Gitee From 2e7c7f669361ffcdd567b3dd0e0dbd807fcc0391 Mon Sep 17 00:00:00 2001 From: yanjuntao Date: Tue, 10 May 2022 14:52:43 +0800 Subject: [PATCH 3/3] delete prompt text Signed-off-by: yanjuntao --- .../src/main/ets/components/NoteListComp.ets | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index 6f114f1..d16399e 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -374,6 +374,16 @@ export struct NoteItemListComp { .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) Stack() { + Flex({ justifyContent: FlexAlign.Center }) { + Text($r("app.string.permanently_delete_tips")) + .fontSize(12) + .fontColor($r("app.color.Recently_delete_prompt_font_color")) + } + .padding({ bottom: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 12 : 0 }) + .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) + .width('100%') + .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.Visible : Visibility.None) + Column() { List({ initialIndex: 0 }) { ListItem() { @@ -392,16 +402,6 @@ export struct NoteItemListComp { .padding({ bottom: 120 }) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.Visible : Visibility.None) - ListItem() { - Text($r("app.string.permanently_delete_tips")) - .fontSize(12) - .fontColor($r("app.color.Recently_delete_prompt_font_color")) - } - .padding({ bottom: this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? 12 : 0 }) - .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - .width('100%') - .visibility(this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes && this.search == false ? Visibility.Visible : Visibility.None) - ForEach(this.inputKeyword.length == 0 ? NoteUtil.getNoteDataArray(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) : this.searchResultList, (noteItem) => { ListItem() { -- Gitee