fix ugly icons and spamming icon warnings

This commit is contained in:
end-4
2024-05-06 23:06:03 +07:00
parent 2531e38e35
commit d4ac618fb3
2 changed files with 9 additions and 4 deletions
@@ -4,6 +4,7 @@ import Widget from 'resource:///com/github/Aylur/ags/widget.js';
const { Box, Button, Icon, Label, Revealer, Scrollable, Slider, Stack } = Widget;
import { MaterialIcon } from '../../.commonwidgets/materialicon.js';
import { setupCursorHover } from '../../.widgetutils/cursorhover.js';
import { iconExists } from '../../.miscutils/icons.js';
const AppVolume = (stream) => Box({
className: 'sidebar-volmixer-stream spacing-h-10',
@@ -66,10 +67,10 @@ const AudioDevices = (input = false) => {
child: Box({
className: 'txt spacing-h-10',
children: [
Icon({
iconExists(stream.iconName) ? Icon({
className: 'txt-norm symbolic-icon',
icon: stream.iconName,
}),
}) : MaterialIcon(input ? 'mic_external_on' : 'media_output', 'norm'),
Label({
hexpand: true,
xalign: 0,