1
0
Fork 0
mirror of synced 2024-05-04 12:33:11 +12:00

Start creating basic Orbtk GUI

This commit is contained in:
Rafał Mikrut 2020-09-05 16:25:19 +02:00
parent 22e7031d3c
commit 9013f447f0
4 changed files with 99 additions and 28 deletions

42
Cargo.lock generated
View file

@ -359,7 +359,7 @@ version = "0.99.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -490,7 +490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"
dependencies = [
"proc-macro-hack",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -689,7 +689,7 @@ dependencies = [
"itertools",
"proc-macro-crate",
"proc-macro-error",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -1074,7 +1074,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6cbfaa472c3514cd7e412cce1907ee43eef58baa5c9aabb38477aebddd4cea67"
dependencies = [
"case",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -1219,7 +1219,7 @@ version = "0.4.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -1282,7 +1282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
"version_check",
@ -1294,7 +1294,7 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"version_check",
]
@ -1322,9 +1322,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.19"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"
checksum = "175c513d55719db99da20232b06cda8bab6b83ec2d04e3283edf0213c37c1a29"
dependencies = [
"unicode-xid 0.2.1",
]
@ -1344,7 +1344,7 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
]
[[package]]
@ -1707,7 +1707,7 @@ version = "1.0.115"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -1782,7 +1782,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"serde",
"serde_derive",
@ -1796,7 +1796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
dependencies = [
"base-x",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"serde",
"serde_derive",
@ -1824,7 +1824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c"
dependencies = [
"heck",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -1837,9 +1837,9 @@ checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1"
[[package]]
name = "sw-composite"
version = "0.7.12"
version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a042aba3c316feb8b9624ba0369240b84ecdf1b2eff58b2c8987ba2dfa22ac4d"
checksum = "9ff0d5b66785ccea8a4486f7b2e2dc6002fd6ed47d8ec2cbfc17974baa48da47"
[[package]]
name = "syn"
@ -1858,7 +1858,7 @@ version = "1.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"unicode-xid 0.2.1",
]
@ -1907,7 +1907,7 @@ version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
]
@ -2005,7 +2005,7 @@ dependencies = [
"bumpalo",
"lazy_static",
"log",
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
"wasm-bindgen-shared",
@ -2027,7 +2027,7 @@ version = "0.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"syn 1.0.39",
"wasm-bindgen-backend",
@ -2096,7 +2096,7 @@ version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f45ddc08a8078f3efa96b5f413268cc9c53b30712891de081fbc1d5846fbc736"
dependencies = [
"proc-macro2 1.0.19",
"proc-macro2 1.0.20",
"quote 1.0.7",
"xml-rs",
]

View file

@ -14,12 +14,9 @@ fn main() {
let builder = gtk::Builder::from_string(glade_src);
// Show first window
let window : gtk::Window = builder.get_object("main_window").unwrap();
let window: gtk::Window = builder.get_object("main_window").unwrap();
window.show_all();
// We start the gtk main loop.
// We start the gtk main loop.
gtk::main();
}

View file

@ -6,4 +6,5 @@ edition = "2018"
[dependencies]
czkawka_core = { path = "../czkawka_core" }
#orbtk = {git = "https://github.com/redox-os/orbtk"}
orbtk = "=0.3.1-alpha3"

View file

@ -1,4 +1,77 @@
use orbtk::prelude::*;
fn main() {
println!("Hello, world!");
println!("Orbtk frontend is still early WIP!");
Application::new()
.window(|ctx| {
Window::new()
.title("Czkawka - Orbtk backend")
.position((100.0, 100.0))
.size(600.0, 500.0)
.resizeable(true)
.child(
TabWidget::new()
.close_button(false)
.tab(
"Duplicate Finder",
Grid::new()
.columns(Columns::create().push(105.0).push(67.0))
.rows(Rows::create().push(50.0).push(32.0).push(32.0).push(32.0).push(32.0))
.margin((84, 40))
.child(
TextBlock::new()
.text("Include Directory:")
.v_align("center")
.h_align("start")
.attach(Grid::column(0))
.attach(Grid::row(0))
.build(ctx),
)
.child(
TextBox::new()
.id("include_directory")
.water_mark("Include Directory")
.v_align("center")
.h_align("start")
.attach(Grid::column(1))
.attach(Grid::row(0))
.min_width(300.0)
.build(ctx),
)
.child(
TextBlock::new()
.text("Exclude Directory:")
.v_align("center")
.h_align("start")
.attach(Grid::column(0))
.attach(Grid::row(1))
.build(ctx),
)
.child(
TextBox::new()
.id("exclude_directory")
.water_mark("Exclude Directory")
.v_align("center")
.h_align("start")
.attach(Grid::column(1))
.attach(Grid::row(1))
.min_width(300.0)
.build(ctx),
)
.child(
TextBlock::new()
.text("Search results:")
.v_align("center")
.h_align("start")
.attach(Grid::column(0))
.attach(Grid::row(2))
.build(ctx),
)
.build(ctx),
)
.close_button(true) // change this to false when will be fixed GH#320
.tab("Empty Folders", TextBlock::new().text("Empty Folders").build(ctx))
.build(ctx),
)
.build(ctx)
})
.run();
}