Update
This commit is contained in:
parent
070dd6326f
commit
45fe815dc4
10
src/main.rs
10
src/main.rs
|
@ -3,7 +3,7 @@
|
||||||
extern crate dotenv;
|
extern crate dotenv;
|
||||||
|
|
||||||
use fltk::{prelude::*, app, text::SimpleTerminal, enums::Color, frame, window, /*button,*/ image};
|
use fltk::{prelude::*, app, text::SimpleTerminal, enums::Color, frame, window, /*button,*/ image};
|
||||||
use fltk_theme::{/*ColorTheme, color_themes, widget_themes, */WidgetTheme, ThemeType, /*WidgetScheme, SchemeType*/};
|
use fltk_theme::{/*ColorTheme, color_themes, widget_themes, */WidgetTheme, ThemeType, WidgetScheme, SchemeType};
|
||||||
|
|
||||||
use tokio::io::{self, BufReader, AsyncBufReadExt};
|
use tokio::io::{self, BufReader, AsyncBufReadExt};
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
|
@ -14,8 +14,11 @@ use std::path::Path;
|
||||||
|
|
||||||
|
|
||||||
async fn run_process() -> tokio::process::Child {
|
async fn run_process() -> tokio::process::Child {
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
let env_path = Path::new("/etc/arch-linux-updater/.env");
|
let env_path = Path::new("/etc/arch-linux-updater/.env");
|
||||||
// let env_path = Path::new(".env_debug");
|
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
let env_path = Path::new(".env_debug");
|
||||||
|
|
||||||
dotenv::from_path(env_path).unwrap();
|
dotenv::from_path(env_path).unwrap();
|
||||||
|
|
||||||
|
@ -80,6 +83,9 @@ async fn gui() -> io::Result<()> {
|
||||||
let widget_theme = WidgetTheme::new(ThemeType::Dark);
|
let widget_theme = WidgetTheme::new(ThemeType::Dark);
|
||||||
widget_theme.apply();
|
widget_theme.apply();
|
||||||
|
|
||||||
|
let widget_scheme = WidgetScheme::new(SchemeType::Fluent);
|
||||||
|
widget_scheme.apply();
|
||||||
|
|
||||||
let mut wind: fltk::window::DoubleWindow = window::Window::default()
|
let mut wind: fltk::window::DoubleWindow = window::Window::default()
|
||||||
.with_size(width, height)
|
.with_size(width, height)
|
||||||
.center_screen()
|
.center_screen()
|
||||||
|
|
Loading…
Reference in New Issue