diff --git a/src/main.rs b/src/main.rs index 3433f80..e9fb684 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,28 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + +/* + This file is the main application file. + Main logic and stuff is located here. Including config loading. + stages loading, switching between stages, and stuff. + */ + + + use iced::widget; use iced::Alignment; @@ -104,7 +129,7 @@ pub fn main() -> iced::Result { iced::application(app_init, update, view) .centered() - .theme(theme::dark_theme()) + .theme(theme::main_theme()) .run() } diff --git a/src/stage.rs b/src/stage.rs index 42c4928..ffde012 100644 --- a/src/stage.rs +++ b/src/stage.rs @@ -1,3 +1,23 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + +/* + This file contains basic enums and structs to be used with stages. + */ use std::collections::HashMap; diff --git a/src/stages/license/mod.rs b/src/stages/license/mod.rs index 1552d9c..7b5b9ff 100644 --- a/src/stages/license/mod.rs +++ b/src/stages/license/mod.rs @@ -1,3 +1,26 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + +/* + This is License stage. Used to inform user about program legal status. + */ + + + use iced::{Alignment, widget}; use rust_i18n::t; diff --git a/src/stages/mod.rs b/src/stages/mod.rs index 73566a4..cb25d8c 100644 --- a/src/stages/mod.rs +++ b/src/stages/mod.rs @@ -1,2 +1,19 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + pub mod welcome; pub mod license; \ No newline at end of file diff --git a/src/stages/welcome/mod.rs b/src/stages/welcome/mod.rs index 1647f2b..2be062d 100644 --- a/src/stages/welcome/mod.rs +++ b/src/stages/welcome/mod.rs @@ -1,3 +1,25 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + +/* + This is Welcome stage, used to greet used and allow user to choose program language + */ + + use crate::stage::{ConfigValue, StageAction, StageResult}; use iced::{Alignment, widget}; use rust_i18n::t; diff --git a/src/theme.rs b/src/theme.rs index ba945e2..8b24c8d 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,16 +1,32 @@ + // + // Copyright (C) <2026> + + // This program is free software: you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation, either version 3 of the License, or + // (at your option) any later version. + + // This program is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this program. If not, see . + + +/* + This file is supposed to be used as theme source for the installer. + Modify it to your liking. + */ + use iced::{color, Theme}; -//use iced::theme::Palette; -pub fn light_theme() -> Theme { + + +// Function returns theme to be used by installer +pub fn main_theme() -> Theme { let mut pl = Theme::Dracula.palette(); pl.primary = color!(0xFFD700); return Theme::custom("Kira Theme", pl); } - -pub fn dark_theme() -> Theme { - let mut pl = Theme::Dracula.palette(); - pl.primary = color!(0xFFD700); - return Theme::custom("Kira Theme", pl); -} - -