mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-12 20:57:46 +02:00
Add title and border to settingbox
Fix padding around window Add some styling
This commit is contained in:
parent
179a2b44cc
commit
9f3815476d
12 changed files with 313 additions and 258 deletions
|
@ -9,8 +9,8 @@ use crate::components::wifi::wifiBox::{WifiBox, scanForWifi};
|
|||
pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let wifiBox = Arc::new(WifiBox::new());
|
||||
scanForWifi(wifiBox.clone());
|
||||
let wifiBox = SettingBox::new(&*wifiBox);
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new());
|
||||
let wifiBox = SettingBox::new(&*wifiBox, "WiFi");
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new(), "Bluetooth");
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&wifiBox, -1);
|
||||
resetMain.insert(&bluetoothBox, -1);
|
||||
|
@ -18,14 +18,16 @@ pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
|||
};
|
||||
|
||||
pub const HANDLE_WIFI_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let wifiBox = SettingBox::new(&WifiBox::new());
|
||||
let wifiBox = Arc::new(WifiBox::new());
|
||||
scanForWifi(wifiBox.clone());
|
||||
let wifiBox = SettingBox::new(&*wifiBox, "WiFi");
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&wifiBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
};
|
||||
|
||||
pub const HANDLE_BLUETOOTH_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new());
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new(), "Bluetooth");
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&bluetoothBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
|
@ -39,14 +41,14 @@ pub const HANDLE_VPN_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
|||
};
|
||||
|
||||
pub const HANDLE_AUDIO_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let audioBox = AudioBox::new();
|
||||
let audioBox = SettingBox::new(&AudioBox::new(), "Audio");
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&audioBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
};
|
||||
|
||||
pub const HANDLE_VOLUME_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let audioBox = AudioBox::new();
|
||||
let audioBox = SettingBox::new(&AudioBox::new(), "Audio");
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&audioBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
|
@ -59,10 +61,6 @@ pub const HANDLE_MICROPHONE_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
|||
resetMain.set_max_children_per_line(1);
|
||||
};
|
||||
|
||||
pub const HANDLE_HOME: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
resetMain.remove_all();
|
||||
};
|
||||
|
||||
pub const HANDLE_PERIPHERALS_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let label = Label::new(Some("not implemented yet"));
|
||||
resetMain.remove_all();
|
||||
|
@ -90,3 +88,7 @@ pub const HANDLE_KEYBOARD_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
|||
resetMain.insert(&label, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
};
|
||||
|
||||
pub const HANDLE_HOME: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
resetMain.remove_all();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue