Skip to content

Commit

Permalink
remove another special case
Browse files Browse the repository at this point in the history
  • Loading branch information
SnosMe committed Jan 11, 2025
1 parent 46403ef commit aecf7c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions renderer/src/web/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,13 @@ function upgradeConfig (_config: Config): Config {
const settings = config.widgets.find(w => w.wmType === 'settings') as widget.Widget
settings.wmTitle = '{icon=fa-cog}'

// make sure icon for settings comes first in the widget menu
config.widgets.sort((a, b) => {
if (a.wmType === 'settings') return -1
if (b.wmType === 'settings') return 1
return 0
})

config.configVersion = 17
}

Expand Down
5 changes: 1 addition & 4 deletions renderer/src/web/overlay/WidgetMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ export default defineComponent({
const wm = inject<WidgetManager>('wm')!
const widgets = computed(() => {
return [
wm.widgets.value.find(widget => widget.wmType === 'settings')!,
...wm.widgets.value.filter(widget => widget.wmType !== 'settings')
].filter(widget =>
return wm.widgets.value.filter(widget =>
!widget.wmFlags.includes('menu::skip') &&
(props.config.alwaysShow || (widget.wmWants === 'hide'))
).map((widget) => {
Expand Down

0 comments on commit aecf7c5

Please sign in to comment.