gnome-control-center/panels/sound/cc-volume-slider.ui
Jordan Petridis b542e98359 sounds: Use correct mute icon in the input section
The current code does not differenciate between input and
output, and thus it shows the same icon for muting outputs
and inputs. As per design suggesion [1], the input row
should use the "microphone-sensitivity-muted-symbolic" icon.

In order to achieve that, move the CcLevelBarStreamType enum
to a separate header, and rename it to CcStreamType. And also
pass the stream type to the volume slider.

In CcVolumeSlider, update the code to switch to the correct
mute icon depending on the stream type.

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/issues/539

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/539
2019-06-16 01:01:36 +00:00

31 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<template class="CcVolumeSlider" parent="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkScale" id="volume_scale">
<property name="visible">True</property>
<property name="adjustment">volume_adjustment</property>
<property name="draw_value">False</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
<object class="GtkToggleButton" id="mute_button">
<property name="visible">True</property>
<property name="relief">none</property>
<signal name="toggled" handler="mute_button_toggled_cb" object="CcVolumeSlider" swapped="yes"/>
<child>
<object class="GtkImage" id="stream_type_icon">
<property name="visible">True</property>
<property name="icon_name">audio-volume-muted-symbolic</property>
</object>
</child>
</object>
</child>
</template>
<object class="GtkAdjustment" id="volume_adjustment">
<signal name="value_changed" handler="volume_changed_cb" object="CcVolumeSlider" swapped="yes"/>
</object>
</interface>