mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-16 02:21:37 +01:00
Big restructuring
This commit is contained in:
parent
c4c95df8d3
commit
13084ed86d
22 changed files with 638 additions and 595 deletions
42
src/components/audio/audioSourceImpl.rs
Normal file
42
src/components/audio/audioSourceImpl.rs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
use gtk::{Button, CompositeTemplate, glib, Image, Label, ProgressBar, Scale};
|
||||
use gtk::subclass::prelude::*;
|
||||
use crate::components::audio::audioSource;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetAudioSourceEntry.ui")]
|
||||
pub struct AudioSourceEntry {
|
||||
#[template_child]
|
||||
pub resetSourceIcon: TemplateChild<Image>,
|
||||
#[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 = "resetAudioSourceEntry";
|
||||
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