changed ui

This commit is contained in:
michael-bailey 2020-08-05 16:30:13 +01:00
parent 20afff2931
commit 164542a56b
4 changed files with 11 additions and 9 deletions

View File

@ -87,9 +87,9 @@ fn Control_Panel() -> ResizedView<Panel<LinearLayout>> {
left.add_child(TextView::new("Hello world"));
root.add_child(left);
root.add_child(right);
ResizedView::new(SizeConstraint::AtLeast(32), SizeConstraint::AtLeast(32), Panel::new(root))
root.add_child(ResizedView::new(SizeConstraint::Full, SizeConstraint::Full, Panel::new(left)));
root.add_child(ResizedView::new(SizeConstraint::Full, SizeConstraint::Full, Panel::new(right)));
ResizedView::new(SizeConstraint::Fixed(64), SizeConstraint::Fixed(20), Panel::new(root))
}
// MARK: - general testing zone

View File

@ -10,8 +10,9 @@ use crossbeam::{Sender, Receiver, TryRecvError, unbounded};
use crate::{
server::{
server_profile::ServerMessages,
commands::Commands
}
},
commands::Commands
};
use std::sync::Mutex;
use std::time::Duration;

View File

@ -203,8 +203,8 @@ impl From<String> for Commands {
impl From<&[u8]> for Commands {
fn from(data: &[u8]) -> Self {
let incoming_message = String::from(String::from_utf8_lossy(data)).as_str();
Commands::from(incoming_message)
let incoming_message = String::from(String::from_utf8_lossy(data));
Commands::from(incoming_message.as_str())
}
}

View File

@ -4,8 +4,9 @@ extern crate rayon;
use crate::{
server::{
client::client_profile::Client,
commands::{Commands}
}
},
commands::Commands
};
use std::{
sync::{Arc, Mutex},