gnome-control-center/panels/sound/cc-volume-slider.ui
Marco Melorio 7fddfa363f sound: Port the mute button in the CcVolumeSlider to GtkButton
The logic inside it is a bit reworked to make it more consistent. The
mute button and the slider now only communicate directly with GVC. The
notify callbacks are now used to change the UI states.

This fixes the UI problem of the mute button being "raised" when pressed
(see https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/520).
2023-01-15 19:44:23 +01:00

29 lines
1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="CcVolumeSlider" parent="GtkWidget">
<child>
<object class="GtkButton" id="mute_button">
<property name="icon_name">audio-volume-muted-symbolic</property>
<property name="action-name">volume-slider.mute</property>
<accessibility>
<property name="label" translatable="yes">Mute</property>
</accessibility>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="GtkScale" id="volume_scale">
<property name="adjustment">volume_adjustment</property>
<property name="hexpand">True</property>
<accessibility>
<property name="label" translatable="yes">Volume</property>
</accessibility>
</object>
</child>
</template>
<object class="GtkAdjustment" id="volume_adjustment">
<signal name="value_changed" handler="volume_changed_cb" object="CcVolumeSlider" swapped="yes"/>
</object>
</interface>