Skip to content

Commit 2af626a

Browse files
committed
fix styles
1 parent efdbc5a commit 2af626a

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

entry/src/main/ets/model/TabStyle.ets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
export const STYLE_CONFIGURATION: Record<string, number> = {
1717
'TAB_BAR_HEIGHT': 48,
18-
'ICON_SIZE': 16,
18+
'ICON_SIZE': 20,
1919
'TAB_BAR_CONTENT_GUTTER': 6,
2020
'TAB_BAR_ITEM_GUTTER': 6,
21-
'SEPARATOR_STROKE_WIDTH': 2,
21+
'SEPARATOR_STROKE_WIDTH': 1,
2222
'CONTENT_GUTTER_M': 12,
2323
'CONTENT_GUTTER_S': 8,
2424
'GRID_HEIGHT': 170,

entry/src/main/ets/pages/Index.ets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct Index {
5050
})
5151

5252
Divider()
53+
.height(1)
5354
.width(FULL_PERCENT)
5455
.backgroundColor($r('sys.color.ohos_id_color_subheading_separator_dark'))
5556

entry/src/main/ets/pages/TabSheetComponent.ets

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ export struct TabSheets {
2525
Image($r('app.media.ic_public_cancel_filled'))
2626
.width(STYLE_CONFIGURATION.ICON_SIZE)
2727
.aspectRatio(1)
28+
.padding(2)
2829
.onClick(() => {
2930
this.closeTabAndTerm(item.id)
3031
})
32+
.hoverEffect(HoverEffect.Highlight)
3133
}
3234
}
3335
.flexShrink(1)
@@ -37,8 +39,7 @@ export struct TabSheets {
3739
})
3840
.borderRadius($r('sys.float.ohos_id_corner_radius_default_xs'))
3941
.height(FULL_PERCENT)
40-
.backgroundColor(this.middleIndex === index ? $r('sys.color.ohos_id_color_background') :
41-
$r('sys.color.ohos_id_color_sub_background'))
42+
.backgroundColor(this.middleIndex === index ? '#222222' : $r('sys.color.ohos_id_color_sub_background'))
4243
.onClick(() => {
4344
this.controller.changeIndex(index);
4445
this.focusIndex = index;
@@ -51,13 +52,21 @@ export struct TabSheets {
5152
.strokeWidth(STYLE_CONFIGURATION.SEPARATOR_STROKE_WIDTH)
5253
.height('50%')
5354
.lineCap(LineCapStyle.Round)
55+
} else {
56+
Divider()
57+
.vertical(true)
58+
.strokeWidth(STYLE_CONFIGURATION.SEPARATOR_STROKE_WIDTH)
59+
.height('50%')
60+
.lineCap(LineCapStyle.Round)
61+
.color($r('sys.color.ohos_id_color_background_transparent'))
5462
}
5563
}
5664
}, (item: TermModel) => 'tab-' + item.id.toString())
5765

5866
Image($r('app.media.ic_public_add_filled'))
5967
.width(STYLE_CONFIGURATION.ICON_SIZE)
6068
.aspectRatio(1)
69+
.padding(2)
6170
.onClick(() => {
6271
if (this.tabArray.length < 6) {
6372

@@ -73,6 +82,7 @@ export struct TabSheets {
7382
})
7483
}
7584
})
85+
.hoverEffect(HoverEffect.Highlight)
7686
}
7787
.padding(STYLE_CONFIGURATION.TAB_SHEET_PADDING)
7888
.backgroundColor($r('sys.color.ohos_id_color_sub_background'))

entry/src/main/resources/base/element/string.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
"name": "documents_permission",
2121
"value": "Access ~/Documents"
2222
},
23-
{
24-
"name": "HandleTabs",
25-
"value": "增删页签"
26-
},
2723
{
2824
"name": "newSheet",
29-
"value": "新建标签"
25+
"value": "Harmonix"
3026
}
3127
]
3228
}

0 commit comments

Comments
 (0)