Fixed bad scissor
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use osui::prelude::*;
|
|
||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
|
||||||
let screen = Screen::new();
|
|
||||||
|
|
||||||
app(screen.clone()).draw(&screen);
|
|
||||||
|
|
||||||
screen.run()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn app(_screen: Arc<Screen>) -> Rsx {
|
|
||||||
rsx! {
|
|
||||||
FlexRow, gap: 1, {
|
|
||||||
@Style { foreground: Some(0xffffff), background: Background::Solid(0x00ff00) };
|
|
||||||
FlexRow {
|
|
||||||
@Transform::new().padding(1, 1).dimensions(40, 1);
|
|
||||||
@Style { foreground: Some(0xffffff), background: Background::RoundedOutline(0xff0000) };
|
|
||||||
@Focused;
|
|
||||||
Input { }
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Style { foreground: Some(0xffffff), background: Background::Solid(0x00ff00) };
|
|
||||||
// FlexRow {
|
|
||||||
// @Transform::new().padding(1, 1).dimensions(40, 1);
|
|
||||||
// @Style { foreground: Some(0xffffff), background: Background::RoundedOutline(0xffff00) };
|
|
||||||
// Input { }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -139,7 +139,7 @@ pub(crate) fn print_liner(
|
|||||||
|
|
||||||
let y = y + i as u16 - parent_transform.offset_y;
|
let y = y + i as u16 - parent_transform.offset_y;
|
||||||
|
|
||||||
if y + i as u16 >= parent_transform.height + parent_transform.y + parent_transform.py {
|
if y >= parent_transform.height + parent_transform.y + parent_transform.py {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
print!("\x1b[{};{}H{liner}{line}\x1b[0m", y + 1, x + 1);
|
print!("\x1b[{};{}H{liner}{line}\x1b[0m", y + 1, x + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user