5454 :aria-expanded =" opened ? ' true' : ' false' "
5555 @click =" onTriggerClick (' currentApp' )" >
5656 <template #icon >
57+ <!-- Settings sub-sections share one generic cog. An inline MDI icon
58+ inherits the button's currentColor (-- color-background-plain-text),
59+ so it stays legible on both bright and dark headers without a filter. -->
60+ <IconCog
61+ v-if =" currentApp .type === ' settings' "
62+ class="app-menu__current-app-cog"
63+ :size =" 20 " />
5764 <img
65+ v-else
5866 class =" app-menu__current-app-icon"
59- :class =" { 'app-menu__current-app-icon--settings': currentApp.type === 'settings' }"
60- :src =" displayIcon"
67+ :src =" currentApp.icon"
6168 alt =" "
6269 aria-hidden =" true" >
6370 </template >
@@ -79,6 +86,7 @@ import { generateUrl, imagePath } from '@nextcloud/router'
7986import { defineComponent , ref } from ' vue'
8087import NcButton from ' @nextcloud/vue/components/NcButton'
8188import NcPopover from ' @nextcloud/vue/components/NcPopover'
89+ import IconCog from ' vue-material-design-icons/Cog.vue'
8290import IconDotsGrid from ' vue-material-design-icons/DotsGrid.vue'
8391import AppItem from ' ./AppItem.vue'
8492import logger from ' ../logger.js'
@@ -91,6 +99,7 @@ export default defineComponent({
9199
92100 components: {
93101 AppItem ,
102+ IconCog ,
94103 IconDotsGrid ,
95104 NcButton ,
96105 NcPopover ,
@@ -172,17 +181,6 @@ export default defineComponent({
172181 : this .currentApp .name
173182 },
174183
175- // Match the collapsed label: a generic cog for any settings
176- // sub-section instead of the per-section icon.
177- displayIcon(): string {
178- if (! this .currentApp ) {
179- return ' '
180- }
181- return this .currentApp .type === ' settings'
182- ? imagePath (' core' , ' actions/settings-dark.svg' )
183- : this .currentApp .icon
184- },
185-
186184 // aria-label overrides the inner span text, so the displayed name
187185 // has to be duplicated here for screen readers.
188186 currentAppLabel(): string {
@@ -466,12 +464,10 @@ export default defineComponent({
466464 // Theme-aware inversion + vertical alpha fade via --header-menu-icon-mask.
467465 filter : var (--background-image-invert-if-bright );
468466 mask : var (--header-menu-icon-mask );
467+ }
469468
470- // Settings icons ship dark (designed for the white settings sidebar);
471- // force-white so they read against the themed header.
472- & --settings {
473- filter : brightness (0 ) invert (1 );
474- }
469+ & __current-app-cog {
470+ mask : var (--header-menu-icon-mask );
475471 }
476472
477473 & __current-app-name {
0 commit comments