mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-01 15:57:46 +02:00
fix some ui stuff
This commit is contained in:
parent
a115ca1ad1
commit
536c5f0563
5 changed files with 37 additions and 9 deletions
|
@ -1,18 +1,37 @@
|
|||
use gtk::FlowBox;
|
||||
use gtk::{Align, FlowBox, FlowBoxChild};
|
||||
use gtk::prelude::{FlowBoxChildExt, WidgetExt};
|
||||
use crate::components::audio::AudioBox;
|
||||
use crate::components::bluetooth::BluetoothBox;
|
||||
use crate::components::wifi::WifiBox;
|
||||
|
||||
pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
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(&wifibox, -1);
|
||||
resetMain.insert(&child1, -1);
|
||||
resetMain.insert(&child2, -1);
|
||||
|
||||
// todo center flowbox children
|
||||
};
|
||||
|
||||
pub const HANDLE_WIFI_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let wifibox = WifiBox::new();
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&wifibox, -1);
|
||||
let child = FlowBoxChild::new();
|
||||
child.set_child(Some(&wifibox));
|
||||
resetMain.insert(&child, -1);
|
||||
};
|
||||
|
||||
pub const HANDLE_BLUETOOTH_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue