Skip to content

Commit

Permalink
Restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
Benji377 committed Jan 19, 2025
1 parent 413842c commit 2c35401
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/editor/editor.rs → src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Editor {
load_file(document_dir_pathbuf),
Message::FileOpened,
),
iced::window::get_latest().map(|id| Message::InitWindow(id)),
iced::window::get_latest().map(Message::InitWindow),
widget::focus_next(),

]),
Expand Down
1 change: 0 additions & 1 deletion src/editor/mod.rs

This file was deleted.

12 changes: 8 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ use global_hotkey::hotkey::{Code, HotKey, Modifiers};
use iced::Font;
use log::LevelFilter;
use simplelog::TermLogger;
use editor::editor::Editor;
use std::sync::LazyLock;

mod editor;
use editor::Editor;
//mod settings;
//use settings::Settings;

static APP_NAME: &str = "SlightlyBetterText";
static LOGO: &[u8] = include_bytes!("assets/logo.ico");
Expand All @@ -32,9 +34,11 @@ pub fn main() -> iced::Result {
simplelog::ColorChoice::Auto,
).expect("Failed to initialize logger");

let mut window_settings = iced::window::Settings::default();
window_settings.visible = true;
window_settings.icon = Some(iced::window::icon::from_file_data(LOGO, None).expect("Failed to load icon"));
let window_settings = iced::window::Settings {
visible: true,
icon: Some(iced::window::icon::from_file_data(LOGO, None).expect("Failed to load icon")),
..iced::window::Settings::default()
};

iced::application(APP_NAME, Editor::update, Editor::view)
.subscription(Editor::subscription)
Expand Down
File renamed without changes.

0 comments on commit 2c35401

Please sign in to comment.