diff --git a/src/components/audio/audioBoxImpl.rs b/src/components/audio/audioBoxImpl.rs index b6070d7..0e4a3b7 100644 --- a/src/components/audio/audioBoxImpl.rs +++ b/src/components/audio/audioBoxImpl.rs @@ -1,4 +1,4 @@ -use gtk::{Button, CompositeTemplate, DropDown, TemplateChild, glib}; +use gtk::{CompositeTemplate, DropDown, TemplateChild, glib}; use gtk::prelude::*; use gtk::subclass::prelude::*; use crate::components::audio::audioBox; diff --git a/src/components/window/handleSidebarClick.rs b/src/components/window/handleSidebarClick.rs index 8d0f6a1..bd4597d 100644 --- a/src/components/window/handleSidebarClick.rs +++ b/src/components/window/handleSidebarClick.rs @@ -1,28 +1,15 @@ -use gtk::{Align, FlowBox, FlowBoxChild, Label}; -use gtk::prelude::{FlowBoxChildExt, WidgetExt}; +use gtk::{FlowBox, FlowBoxChild, Label}; +use gtk::prelude::FlowBoxChildExt; use crate::components::audio::audioBox::AudioBox; use crate::components::bluetooth::bluetoothBox::BluetoothBox; use crate::components::wifi::wifiBox::WifiBox; pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| { - let wifibox = WifiBox::new(); + let wifiBox = WifiBox::new(); let bluetoothBox = BluetoothBox::new(); - let child1 = FlowBoxChild::new(); - let child2 = FlowBoxChild::new(); - - wifibox.set_halign(Align::Start); - bluetoothBox.set_halign(Align::Start); - - child1.set_halign(Align::Fill); - child2.set_halign(Align::Fill); - - child1.set_child(Some(&wifibox)); - child2.set_child(Some(&bluetoothBox)); - resetMain.remove_all(); - resetMain.insert(&child1, -1); - resetMain.insert(&child2, -1); - + resetMain.insert(&wifiBox, -1); + resetMain.insert(&bluetoothBox, -1); // todo center flowbox children };