|
45 | 45 | </div> |
46 | 46 | </div> |
47 | 47 | </NcPopover> |
48 | | - <button |
| 48 | + <NcButton |
49 | 49 | v-if="currentApp" |
50 | 50 | class="app-menu__current-app" |
51 | | - type="button" |
| 51 | + variant="tertiary-no-background" |
52 | 52 | :aria-label="t('core', 'Open apps menu')" |
53 | 53 | aria-haspopup="menu" |
54 | 54 | :aria-expanded="opened ? 'true' : 'false'" |
55 | 55 | @click="onTriggerClick('currentApp')"> |
56 | | - <img |
57 | | - class="app-menu__current-app-icon" |
58 | | - :src="currentApp.icon" |
59 | | - alt="" |
60 | | - aria-hidden="true"> |
| 56 | + <template #icon> |
| 57 | + <img |
| 58 | + class="app-menu__current-app-icon" |
| 59 | + :src="currentApp.icon" |
| 60 | + alt="" |
| 61 | + aria-hidden="true"> |
| 62 | + </template> |
61 | 63 | <span class="app-menu__current-app-name"> |
62 | 64 | {{ currentApp.name }} |
63 | 65 | </span> |
64 | | - </button> |
| 66 | + </NcButton> |
65 | 67 | </nav> |
66 | 68 | </template> |
67 | 69 |
|
@@ -118,7 +120,7 @@ export default defineComponent({ |
118 | 120 | active: false, |
119 | 121 | order: Number.MAX_SAFE_INTEGER, |
120 | 122 | href: generateUrl('/settings/apps'), |
121 | | - icon: generateFilePath('settings', 'img', 'apps.svg'), |
| 123 | + icon: generateFilePath('settings', 'img', 'settings_apps.svg'), |
122 | 124 | type: 'link', |
123 | 125 | name: t('core', 'More apps'), |
124 | 126 | unread: 0, |
@@ -341,38 +343,28 @@ export default defineComponent({ |
341 | 343 | } |
342 | 344 |
|
343 | 345 | &__current-app { |
344 | | - display: flex; |
345 | | - align-items: center; |
346 | | - gap: var(--default-grid-baseline); |
347 | | - height: var(--default-clickable-area); |
348 | | - padding-inline: calc(var(--default-grid-baseline) * 2); |
349 | | - background: transparent; |
350 | | - border: none; |
351 | | - border-radius: var(--border-radius-element); |
| 346 | + // NcButton's tertiary-no-background variant uses --color-main-text, |
| 347 | + // which is dark on light themes. The header sits on the theme primary |
| 348 | + // background, so override to use the matching plain-text color. |
| 349 | + --color-main-text: var(--color-background-plain-text); |
352 | 350 | color: var(--color-background-plain-text); |
353 | | - cursor: pointer; |
354 | | - // Suppress the mobile-Safari grey tap rectangle that briefly flashes on press. |
355 | | - -webkit-tap-highlight-color: transparent; |
356 | | -
|
357 | | - // The header sits on the theme-primary background with white text, so |
358 | | - // --color-background-hover (white-ish) collapses contrast. A translucent |
359 | | - // black overlay reads on any header tint. |
360 | | - &:hover { |
361 | | - background: rgba(0, 0, 0, 0.1); |
| 351 | +
|
| 352 | + // !important: v8 NcButton's legacy bundle sets focus-visible |
| 353 | + // outline/box-shadow with !important. Same translucent-black hover/ |
| 354 | + // active overlays as the waffle: --color-background-hover collapses |
| 355 | + // contrast against the theme-primary header tint. |
| 356 | + &:hover:not(:disabled) { |
| 357 | + background-color: rgba(0, 0, 0, 0.1) !important; |
362 | 358 | } |
363 | 359 |
|
364 | | - // core/css/inputs.scss:89 sets :active background to --color-main-background |
365 | | - // (white on light themes), which makes the masked icon read as white-on-white. |
366 | | - // !important: the global rule's :not() chain is hard to out-specify. |
367 | | - &:active { |
| 360 | + &:active:not(:disabled) { |
368 | 361 | background-color: rgba(0, 0, 0, 0.15) !important; |
369 | | - color: var(--color-background-plain-text) !important; |
370 | 362 | } |
371 | 363 |
|
372 | 364 | &:focus-visible { |
373 | | - background: rgba(0, 0, 0, 0.1); |
374 | | - outline: none; |
375 | | - box-shadow: inset 0 0 0 2px var(--color-background-plain-text); |
| 365 | + background-color: rgba(0, 0, 0, 0.1) !important; |
| 366 | + outline: none !important; |
| 367 | + box-shadow: inset 0 0 0 2px var(--color-background-plain-text) !important; |
376 | 368 | } |
377 | 369 | } |
378 | 370 |
|
|
0 commit comments