Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-04-25 17:47:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c4104a46ffebbb536cfbb1afd22902699875fac5
c4104a46
1 parent
09030778
tab 样式优化
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
c4104a4
...
...
@@ -263,10 +263,10 @@ export struct TopNavigationComponent {
if (this.currentTopNavSelectedIndex == 0) {
return item.name === '视频' ? Color.White : '#e5e0e0'
} else {
return this.currentTopNavSelectedIndex === index ? Color.Black :
Color.Gray
return this.currentTopNavSelectedIndex === index ? Color.Black :
"#999999"
}
} else {
return this.currentTopNavSelectedIndex === index ? Color.Black :
Color.Gray
return this.currentTopNavSelectedIndex === index ? Color.Black :
"#999999"
}
}
...
...
@@ -274,30 +274,28 @@ export struct TopNavigationComponent {
tabBarBuilder(item: TopNavDTO, index: number) {
Column() {
Text(item.name)
.fontSize(
this.currentTopNavSelectedIndex === index ? $r('app.float.selected_text_size') : $r('app.float.normal
_text_size'))
.fontSize(
$r('app.float.selected
_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(this.getFontColor(item, index))
.padding({ top: $r('app.float.top_tab_item_padding_top') })
.padding({ top: $r('app.float.top_tab_item_padding_top')
, bottom: $r('app.float.top_tab_item_padding_bottom')
})
.maxLines(this.MAX_LINE)
if (this.currentTopNavSelectedIndex === index) {
Row()
.width(20)
.height(3)
.backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)
.backgroundImageSize(ImageSize.Contain)
}
}
.hoverEffect(HoverEffect.Highlight)
.constraintSize({
minWidth: $r('app.float.top_tab_item_min_width'),
maxWidth: $r('app.float.top_tab_item_max_width')
})
// .margin({ right: 36 })
.backgroundColor(Color.Transparent)
.padding({
left: $r('app.float.top_tab_item_padding_horizontal'),
right: $r('app.float.top_tab_item_padding_horizontal'),
bottom: $r('app.float.top_tab_item_padding_bottom')
})
.id(`col_tabBar${index}`)
.margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
View file @
c4104a4
...
...
@@ -34,7 +34,7 @@
},
{
"name"
:
"selected_text_size"
,
"value"
:
"1
8f
p"
"value"
:
"1
7v
p"
},
{
"name"
:
"font_size_18"
,
...
...
@@ -178,11 +178,11 @@
},
{
"name"
:
"top_tab_item_padding_bottom"
,
"value"
:
"
5
vp"
"value"
:
"
2
vp"
},
{
"name"
:
"top_tab_item_padding_top"
,
"value"
:
"
2
vp"
"value"
:
"
5
vp"
},
{
"name"
:
"top_bar_height"
,
...
...
Please
register
or
login
to post a comment