Merge pull request #1002 from Demonthos/fix-workspace-name-collisions
Fix duplicate example and test names
This commit is contained in:
9 files changed
+41
-101
No files matched your search
File renamed without changes.
@@ -1,67 +0,0 @@
|
|||||||
#![allow(non_snake_case)]
|
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
|
||||||
use dioxus_tui::Config;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
dioxus_tui::launch_cfg(app, Config::default());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Props, PartialEq)]
|
|
||||||
struct QuadrentProps {
|
|
||||||
color: String,
|
|
||||||
text: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn Quadrant(cx: Scope<QuadrentProps>) -> Element {
|
|
||||||
cx.render(rsx! {
|
|
||||||
div {
|
|
||||||
border_width: "1px",
|
|
||||||
width: "50%",
|
|
||||||
height: "100%",
|
|
||||||
background_color: "{cx.props.color}",
|
|
||||||
justify_content: "center",
|
|
||||||
align_items: "center",
|
|
||||||
|
|
||||||
"{cx.props.text}"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fn app(cx: Scope) -> Element {
|
|
||||||
cx.render(rsx! {
|
|
||||||
div {
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
flex_direction: "column",
|
|
||||||
|
|
||||||
div {
|
|
||||||
width: "100%",
|
|
||||||
height: "50%",
|
|
||||||
flex_direction: "row",
|
|
||||||
Quadrant{
|
|
||||||
color: "red".to_string(),
|
|
||||||
text: "[A]".to_string()
|
|
||||||
},
|
|
||||||
Quadrant{
|
|
||||||
color: "black".to_string(),
|
|
||||||
text: "[B]".to_string()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
width: "100%",
|
|
||||||
height: "50%",
|
|
||||||
flex_direction: "row",
|
|
||||||
Quadrant{
|
|
||||||
color: "green".to_string(),
|
|
||||||
text: "[C]".to_string()
|
|
||||||
},
|
|
||||||
Quadrant{
|
|
||||||
color: "blue".to_string(),
|
|
||||||
text: "[D]".to_string()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
File renamed without changes.
@@ -1,7 +1,31 @@
|
|||||||
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use dioxus_tui::Config;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
dioxus_tui::launch(app);
|
dioxus_tui::launch_cfg(app, Config::default());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Props, PartialEq)]
|
||||||
|
struct QuadrentProps {
|
||||||
|
color: String,
|
||||||
|
text: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn Quadrant(cx: Scope<QuadrentProps>) -> Element {
|
||||||
|
cx.render(rsx! {
|
||||||
|
div {
|
||||||
|
border_width: "1px",
|
||||||
|
width: "50%",
|
||||||
|
height: "100%",
|
||||||
|
background_color: "{cx.props.color}",
|
||||||
|
justify_content: "center",
|
||||||
|
align_items: "center",
|
||||||
|
|
||||||
|
"{cx.props.text}"
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app(cx: Scope) -> Element {
|
fn app(cx: Scope) -> Element {
|
||||||
@@ -15,22 +39,13 @@ fn app(cx: Scope) -> Element {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
height: "50%",
|
height: "50%",
|
||||||
flex_direction: "row",
|
flex_direction: "row",
|
||||||
div {
|
Quadrant{
|
||||||
border_width: "1px",
|
color: "red".to_string(),
|
||||||
width: "50%",
|
text: "[A]".to_string()
|
||||||
height: "100%",
|
},
|
||||||
background_color: "red",
|
Quadrant{
|
||||||
justify_content: "center",
|
color: "black".to_string(),
|
||||||
align_items: "center",
|
text: "[B]".to_string()
|
||||||
"[A]"
|
|
||||||
}
|
|
||||||
div {
|
|
||||||
width: "50%",
|
|
||||||
height: "100%",
|
|
||||||
background_color: "black",
|
|
||||||
justify_content: "center",
|
|
||||||
align_items: "center",
|
|
||||||
"[B]"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,21 +53,13 @@ fn app(cx: Scope) -> Element {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
height: "50%",
|
height: "50%",
|
||||||
flex_direction: "row",
|
flex_direction: "row",
|
||||||
div {
|
Quadrant{
|
||||||
width: "50%",
|
color: "green".to_string(),
|
||||||
height: "100%",
|
text: "[C]".to_string()
|
||||||
background_color: "green",
|
},
|
||||||
justify_content: "center",
|
Quadrant{
|
||||||
align_items: "center",
|
color: "blue".to_string(),
|
||||||
"[C]"
|
text: "[D]".to_string()
|
||||||
}
|
|
||||||
div {
|
|
||||||
width: "50%",
|
|
||||||
height: "100%",
|
|
||||||
background_color: "blue",
|
|
||||||
justify_content: "center",
|
|
||||||
align_items: "center",
|
|
||||||
"[D]"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File renamed without changes.
@@ -178,7 +178,7 @@ impl<'a> TreeMut for TreeMutView<'a> {
|
|||||||
fn set_height(tree: &mut TreeMutView<'_>, node: NodeId, height: u16) {
|
fn set_height(tree: &mut TreeMutView<'_>, node: NodeId, height: u16) {
|
||||||
let children = {
|
let children = {
|
||||||
let mut node_data_mut = &mut tree.1;
|
let mut node_data_mut = &mut tree.1;
|
||||||
let mut node = (&mut node_data_mut).get(node).unwrap();
|
let node = (&mut node_data_mut).get(node).unwrap();
|
||||||
node.height = height;
|
node.height = height;
|
||||||
node.children.clone()
|
node.children.clone()
|
||||||
};
|
};
|
||||||
|
|||||||
File renamed without changes.
@@ -26,7 +26,7 @@ impl<'a> RinkBuffer<'a> {
|
|||||||
// panic!("({x}, {y}) is not in {area:?}");
|
// panic!("({x}, {y}) is not in {area:?}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let mut cell = self.buf.get_mut(x, y);
|
let cell = self.buf.get_mut(x, y);
|
||||||
cell.bg = convert(self.cfg.rendering_mode, new.bg.blend(cell.bg));
|
cell.bg = convert(self.cfg.rendering_mode, new.bg.blend(cell.bg));
|
||||||
if new.symbol.is_empty() {
|
if new.symbol.is_empty() {
|
||||||
if !cell.symbol.is_empty() {
|
if !cell.symbol.is_empty() {
|
||||||
|
|||||||
File renamed without changes.
Reference in new issue
Block a user