mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-12 20:57:46 +02:00
Add templates for box and listboxrow
kekw
This commit is contained in:
parent
7e15201c85
commit
af7776d62a
24 changed files with 333 additions and 205 deletions
|
@ -1,30 +1,32 @@
|
|||
use gtk::{FlowBox, FlowBoxChild, Label};
|
||||
use gtk::prelude::FlowBoxChildExt;
|
||||
use gtk::{FlowBox, Label};
|
||||
use gtk::prelude::WidgetExt;
|
||||
use crate::components::audio::audioBox::AudioBox;
|
||||
use crate::components::bluetooth::bluetoothBox::BluetoothBox;
|
||||
use crate::components::temp::settingBox::SettingBox;
|
||||
use crate::components::wifi::wifiBox::WifiBox;
|
||||
|
||||
pub const HANDLE_CONNECTIVITY_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let wifiBox = WifiBox::new();
|
||||
let bluetoothBox = BluetoothBox::new();
|
||||
let wifiBox = SettingBox::new(&WifiBox::new());
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new());
|
||||
wifiBox.set_width_request(500); // todo why not working from ui file
|
||||
bluetoothBox.set_width_request(500); // todo why not working from ui file
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&wifiBox, -1);
|
||||
resetMain.insert(&bluetoothBox, -1);
|
||||
// todo center flowbox children
|
||||
resetMain.set_max_children_per_line(2);
|
||||
};
|
||||
|
||||
pub const HANDLE_WIFI_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let wifibox = WifiBox::new();
|
||||
let wifiBox = SettingBox::new(&WifiBox::new());
|
||||
wifiBox.set_width_request(500); // todo why not working from ui file
|
||||
resetMain.remove_all();
|
||||
let child = FlowBoxChild::new();
|
||||
child.set_child(Some(&wifibox));
|
||||
resetMain.insert(&child, -1);
|
||||
resetMain.insert(&wifiBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
};
|
||||
|
||||
pub const HANDLE_BLUETOOTH_CLICK: fn(FlowBox) = |resetMain: FlowBox| {
|
||||
let bluetoothBox = BluetoothBox::new();
|
||||
let bluetoothBox = SettingBox::new(&BluetoothBox::new());
|
||||
bluetoothBox.set_width_request(500); // todo why not working from ui file
|
||||
resetMain.remove_all();
|
||||
resetMain.insert(&bluetoothBox, -1);
|
||||
resetMain.set_max_children_per_line(1);
|
||||
|
|
|
@ -54,7 +54,7 @@ impl Window {
|
|||
|
||||
pub fn handleDynamicSidebar(&self) {
|
||||
let selfImp = self.imp();
|
||||
selfImp.resetSidebarBreakpoint.set_condition(BreakpointCondition::parse("max-width: 600sp").as_ref().ok());
|
||||
selfImp.resetSidebarBreakpoint.set_condition(BreakpointCondition::parse("max-width: 700sp").as_ref().ok());
|
||||
selfImp.resetSidebarBreakpoint.add_setter(
|
||||
&Object::from(selfImp.resetOverlaySplitView.get()),
|
||||
"collapsed",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue