mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Improve UI look and feel (#36)
* Set ui theme to Greybird * Improve text in UI * Fix wrong comment in ui
This commit is contained in:
Generated
+70
-25
@@ -93,6 +93,7 @@ dependencies = [
|
||||
"fl2rust",
|
||||
"flate2",
|
||||
"fltk",
|
||||
"fltk-theme",
|
||||
"futures",
|
||||
"nom 7.0.0",
|
||||
"nom_locate",
|
||||
@@ -145,6 +146,24 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cocoa-colors"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7fc3439406f349e0bc20d7de87314803378a535190d12e62991f7c8474d5296"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "color-maps"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "120b737cc99b0d73bf0a9bfa6086e84c0bde3b955851f37f812865bc08b35feb"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "0.11.0"
|
||||
@@ -186,6 +205,26 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "4.0.2"
|
||||
@@ -248,35 +287,38 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fltk"
|
||||
version = "1.2.4"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c30618861047220f552e9e7dba957bd9c0953f23d96e27447ca4a934f05870a2"
|
||||
checksum = "1333f26073613a26e43e927618cc00434137598e1193061f02888b1f5ec3dcc5"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"fltk-derive",
|
||||
"crossbeam-channel",
|
||||
"fltk-sys",
|
||||
"raw-window-handle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fltk-derive"
|
||||
version = "1.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36c1111ff05b7d2552093f23dd9db1e0e380f9c6c0b57d69e21811eb4057d011"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
"paste",
|
||||
"ttf-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fltk-sys"
|
||||
version = "1.2.4"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ccc3328371cbe9d01b89488e815c39c5680843379606aa74b1b169c1f54a489"
|
||||
checksum = "30116a4f6cf3b4b316a49af121e8b15805ad520be8fddb1b3e1fd3a6e66483da"
|
||||
dependencies = [
|
||||
"cmake",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fltk-theme"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abee3d9b0ed8bd45d10e4cc279d757ce71c37224482e8377a99906f7be771266"
|
||||
dependencies = [
|
||||
"cocoa-colors",
|
||||
"color-maps",
|
||||
"fltk",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
@@ -856,6 +898,12 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.1.0"
|
||||
@@ -962,15 +1010,6 @@ dependencies = [
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.10"
|
||||
@@ -1374,6 +1413,12 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
|
||||
|
||||
[[package]]
|
||||
name = "ttf-parser"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c74c96594835e10fa545e2a51e8709f30b173a092bfd6036ef2cec53376244f3"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.6"
|
||||
|
||||
+3
-1
@@ -21,13 +21,15 @@ flate2 = "^1.0.22"
|
||||
toml = { version = "^0.5.8", optional = true }
|
||||
futures = { version = "^0.3.17" }
|
||||
dashmap = { version = "^4.0.2", features = ["serde"] }
|
||||
fltk-theme = {version ="0.4" , optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
fl2rust = { version = "0.4", optional = true }
|
||||
|
||||
[features]
|
||||
# default = ["ui"]
|
||||
ui = ["fltk", "fl2rust", "toml"]
|
||||
ui = ["fltk", "fl2rust", "toml", "fltk-theme"]
|
||||
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winreg = "0.10.1"
|
||||
+3
-3
@@ -11,7 +11,6 @@ class UserInterface {open
|
||||
xywh {1 1 500 475} type Double visible
|
||||
} {
|
||||
|
||||
|
||||
# ----- Steam -----
|
||||
Fl_Input steam_location_input {
|
||||
label {Steam Location}
|
||||
@@ -26,7 +25,8 @@ class UserInterface {open
|
||||
xywh {25 75 155 25} down_box DOWN_BOX
|
||||
}
|
||||
Fl_Input steamgrid_db_auth_key_input {
|
||||
label {Authentication Key}
|
||||
label {SteamGridDb API Key}
|
||||
tooltip {See how to get your key here https://github.com/PhilipK/BoilR#getting-cover-art-for-your-shortcuts}
|
||||
xywh {175 75 300 25} align 5
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class UserInterface {open
|
||||
}
|
||||
}
|
||||
|
||||
# ----- Origin -----
|
||||
# ----- GOG -----
|
||||
Fl_Check_Button enable_gog_checkbox {
|
||||
label {GOG Galaxy}
|
||||
xywh {25 325 155 25} down_box DOWN_BOX
|
||||
|
||||
+4
-1
@@ -1,14 +1,17 @@
|
||||
use crate::sync::run_sync;
|
||||
use crate::ui::UserInterface;
|
||||
use crate::{egs::get_default_location, settings::Settings};
|
||||
use fltk::enums::Color;
|
||||
use fltk::{app, prelude::*};
|
||||
use fltk_theme::{ColorTheme, WidgetTheme, color_themes, ThemeType};
|
||||
use futures::executor::block_on;
|
||||
use std::error::Error;
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
pub async fn run_ui() -> Result<(), Box<dyn Error>> {
|
||||
let app = app::App::default().with_scheme(app::Scheme::Gtk);
|
||||
|
||||
let widget_theme = WidgetTheme::new(ThemeType::Greybird);
|
||||
widget_theme.apply();
|
||||
let settings = Rc::new(RefCell::new(Settings::new()?));
|
||||
let mut ui = UserInterface::make_window();
|
||||
update_ui_with_settings(&mut ui, &settings.clone().borrow());
|
||||
|
||||
Reference in New Issue
Block a user