Skip to content

Commit

Permalink
various fixes and touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Aug 24, 2024
1 parent d1b5dda commit e718a05
Show file tree
Hide file tree
Showing 9 changed files with 579 additions and 189 deletions.
531 changes: 461 additions & 70 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ license = false
eula = false

[dependencies]
image = { version = "0.24.8", features = ["ico"] }
image = { version = "0.25.2", features = ["ico"] }
iced-multi-window = { git = "https://github.com/justdeeevin/iced-multi-window" }
iced_aw = { version = "0.8.0", features = [
iced_aw = { version = "0.9.3", features = [
"selection_list",
"number_input",
"quad",
Expand Down Expand Up @@ -50,9 +50,6 @@ zip = "2.2.0"
[features]
grab = ["rdev/unstable_grab"]

[target.'cfg(windows)'.dependencies]
mslnk = "0.1.8"

# The profile that 'cargo dist' will build with
[profile.dist]
inherits = "release"
Expand All @@ -67,7 +64,12 @@ ci = "github"
# The installers to generate for each app
installers = ["msi"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
]
# Which actions to run on pull requests
pr-run-mode = "plan"

Expand Down
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
openssl
wayland
libxkbcommon
libevdev
] ++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
];
Expand Down Expand Up @@ -153,6 +154,8 @@
packages = with pkgs; [
cargo-dist
];

LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath commonArgs.buildInputs}";
};
});
}
8 changes: 4 additions & 4 deletions src/logic/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ impl NuhxBoard {
pub fn load_keyboard(&mut self, keyboard: usize) -> Command<Message> {
self.settings.keyboard = keyboard;

self.keyboard = Some(keyboard);
self.keyboard_choice = Some(keyboard);
self.style = Style::default();

let mut path = self.keyboards_path.clone();
Expand All @@ -20,7 +20,7 @@ impl NuhxBoard {
}
};

self.config = match serde_json::from_reader(config_file) {
self.layout = match serde_json::from_reader(config_file) {
Ok(config) => config,
Err(e) => {
return self.error(Error::ConfigParse(if e.is_eof() {
Expand Down Expand Up @@ -79,8 +79,8 @@ impl NuhxBoard {
window::resize(
window::Id::MAIN,
iced::Size {
width: self.config.width,
height: self.config.height,
width: self.layout.width,
height: self.layout.height,
},
)
}
Expand Down
Loading

0 comments on commit e718a05

Please sign in to comment.