Skip to content

Commit 0c6b1e4

Browse files
committed
fix(navbar): resize avatar img to fit in navbar
1 parent e80d937 commit 0c6b1e4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/components/common/navbar/NavbarComponent.vue

+2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ nav {
162162
}
163163
164164
:deep(.tab) {
165+
--n-font-weight-strong: normal;
166+
165167
padding: 0 0.25rem;
166168
}
167169
}

src/components/common/navbar/NavbarSettingsDopdown.vue

+3-6
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@ const onSelect: DropdownProps['onSelect'] = async (key: string, { label }) => {
146146
>
147147
<NFlex justify="space-around" align="center" :wrap="false">
148148
<NEllipsis
149-
style="
150-
max-width: calc(100vw / 6 - 0.25rem - 3px - 1.75rem);
151-
margin-right: 1.75rem;
152-
margin-left: 0.5rem;
153-
"
149+
style="max-width: calc(100vw / 6 - 0.25rem - 3px - 1.75rem); margin-left: 0.25rem"
154150
:tooltip="{
155151
to: parentElement,
156152
placement: 'left',
@@ -163,10 +159,11 @@ const onSelect: DropdownProps['onSelect'] = async (key: string, { label }) => {
163159
<NAvatar
164160
v-if="!fallback && avatar"
165161
:src="avatar"
162+
class="avatar"
166163
round
167164
size="small"
168165
color="transparent"
169-
style="position: absolute; top: 0.125rem; right: 0.5rem; scale: 0.8"
166+
:style="{ '--n-avatar-size-override': '1.3125rem' }"
170167
:on-error="onAvatarError"
171168
/>
172169
<NIcon v-else style="position: absolute; top: 0.4rem; right: 0.75rem" size="1.5em">

0 commit comments

Comments
 (0)