mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
Implement Microphone UI
Improve Audio UI You won't believe what happened (gone sexual)
This commit is contained in:
parent
d07180e2c7
commit
35c58e2fcd
36 changed files with 1380 additions and 399 deletions
40
src/components/output/audioSourceImpl.rs
Normal file
40
src/components/output/audioSourceImpl.rs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
use gtk::{Button, CompositeTemplate, glib, Image, Label, ProgressBar, Scale};
|
||||
use gtk::subclass::prelude::*;
|
||||
use crate::components::output::audioSource;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetOutputStreamEntry.ui")]
|
||||
pub struct AudioSourceEntry {
|
||||
#[template_child]
|
||||
pub resetSourceName: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub resetSourceMute: TemplateChild<Button>,
|
||||
#[template_child]
|
||||
pub resetVolumeSlider: TemplateChild<Scale>,
|
||||
#[template_child]
|
||||
pub resetVolumePercentage: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub resetVolumeMeter: TemplateChild<ProgressBar>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for AudioSourceEntry {
|
||||
const NAME: &'static str = "resetOutputStreamEntry";
|
||||
type Type = audioSource::AudioSourceEntry;
|
||||
type ParentType = gtk::Box;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl BoxImpl for AudioSourceEntry {}
|
||||
|
||||
impl ObjectImpl for AudioSourceEntry {}
|
||||
|
||||
impl WidgetImpl for AudioSourceEntry {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue