Implement Microphone UI

Improve Audio UI
You won't believe what happened (gone sexual)
This commit is contained in:
takotori 2023-11-12 17:43:01 +01:00
parent d07180e2c7
commit 35c58e2fcd
36 changed files with 1380 additions and 399 deletions

View file

@ -1,21 +1,19 @@
use crate::components::base::settingBoxImpl;
use adw::glib;
use adw::glib::{IsA, Object};
use glib::subclass::prelude::ObjectSubclassIsExt;
use gtk::prelude::FrameExt;
use gtk::prelude::BoxExt;
use gtk::Widget;
glib::wrapper! {
pub struct SettingBox(ObjectSubclass<settingBoxImpl::SettingBox>)
@extends gtk::Frame, gtk::Widget,
@extends gtk::Box, gtk::Widget,
@implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
}
impl SettingBox {
pub fn new(child: &impl IsA<Widget>, title: &str) -> Self {
pub fn new(child: &impl IsA<Widget>) -> Self {
let entry: SettingBox = Object::builder().build();
entry.set_child(Some(child));
entry.imp().resetSettingLabel.set_text(title);
entry.append(child);
entry
}
}

View file

@ -5,16 +5,13 @@ use crate::components::base::settingBox;
#[allow(non_snake_case)]
#[derive(Default, CompositeTemplate)]
#[template(resource = "/org/Xetibo/ReSet/resetSettingBox.ui")]
pub struct SettingBox {
#[template_child]
pub resetSettingLabel: TemplateChild<Label>,
}
pub struct SettingBox {}
#[glib::object_subclass]
impl ObjectSubclass for SettingBox {
const NAME: &'static str = "resetSettingFrame";
const NAME: &'static str = "resetSettingBox";
type Type = settingBox::SettingBox;
type ParentType = gtk::Frame;
type ParentType = gtk::Box;
fn class_init(klass: &mut Self::Class) {
klass.bind_template();
@ -31,7 +28,7 @@ impl ObjectImpl for SettingBox {
}
}
impl FrameImpl for SettingBox {}
impl BoxImpl for SettingBox {}
impl WidgetImpl for SettingBox {}