mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-18 18:48:33 +02:00
cleanup
This commit is contained in:
parent
e34e8ce80f
commit
ee3ee7010e
|
@ -1,4 +1,4 @@
|
||||||
use gtk::{Button, CompositeTemplate, DropDown, TemplateChild, glib};
|
use gtk::{CompositeTemplate, DropDown, TemplateChild, glib};
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::subclass::prelude::*;
|
use gtk::subclass::prelude::*;
|
||||||
use crate::components::audio::audioBox;
|
use crate::components::audio::audioBox;
|
||||||
|
|
|
@ -1,28 +1,15 @@
|
||||||
use gtk::{Align, FlowBox, FlowBoxChild, Label};
|
use gtk::{FlowBox, FlowBoxChild, Label};
|
||||||
use gtk::prelude::{FlowBoxChildExt, WidgetExt};
|
use gtk::prelude::FlowBoxChildExt;
|
||||||
use crate::components::audio::audioBox::AudioBox;
|
use crate::components::audio::audioBox::AudioBox;
|
||||||
use crate::components::bluetooth::bluetoothBox::BluetoothBox;
|
use crate::components::bluetooth::bluetoothBox::BluetoothBox;
|
||||||
use crate::components::wifi::wifiBox::WifiBox;
|
use crate::components::wifi::wifiBox::WifiBox;
|
||||||
|
|
||||||
pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||||
let wifibox = WifiBox::new();
|
let wifiBox = WifiBox::new();
|
||||||
let bluetoothBox = BluetoothBox::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.remove_all();
|
||||||
resetMain.insert(&child1, -1);
|
resetMain.insert(&wifiBox, -1);
|
||||||
resetMain.insert(&child2, -1);
|
resetMain.insert(&bluetoothBox, -1);
|
||||||
|
|
||||||
// todo center flowbox children
|
// todo center flowbox children
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue