Skip to content

Commit

Permalink
Refactored to support multiple windows and added initial support for …
Browse files Browse the repository at this point in the history
…additional functions constants and conversions (not actually implemented at this time).
  • Loading branch information
shartrec committed Jun 11, 2024
1 parent c1758ef commit 6f9bb6a
Show file tree
Hide file tree
Showing 7 changed files with 384 additions and 174 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
[dependencies.iced]
git = "https://github.com/iced-rs/iced.git"
rev = "cdb18e610a72b4a025d7e1890140393adee5b087"
features = ["highlighter"]
features = ["multi-window"]
12 changes: 5 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
*
*/

use iced::{program, Size};
use iced::multi_window::Application;
use iced::Settings;
use iced::Size;

use crate::ui::window::CalculatorApp;
use crate::ui::calculator_app::CalculatorApp;

mod evaluator;

Expand All @@ -40,7 +41,7 @@ fn main() -> iced::Result {
// .with_window_class("KelpieCalcClass", "KelpieCalcIcon");
//
let window_settings = iced::window::Settings {
size: Size::new(330.0, 450.0),
size: Size::new(330.0, 420.0),
min_size: Some(Size::new(300.0, 420.0)),
..iced::window::Settings::default()
};
Expand All @@ -51,9 +52,6 @@ fn main() -> iced::Result {
.. Settings::default()
};

program("My Calculator", CalculatorApp::update, CalculatorApp::view)
.settings(settings)
.subscription(CalculatorApp::subscription)
.run()
CalculatorApp::run(settings)
}

Loading

0 comments on commit 6f9bb6a

Please sign in to comment.