Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e346cf6
cargo update
MCOfficer Apr 6, 2024
39565e5
Initial Commit
Koranir Jul 6, 2024
421c80f
show actual path + icon style
Koranir Jul 6, 2024
8d4e71f
Move thing to settings tab
Koranir Jul 7, 2024
e8992f0
Merge branch 'refs/heads/master' into settings-tab
MCOfficer Jul 7, 2024
cad8666
Fix wonkiness from merge conflicts
MCOfficer Jul 7, 2024
bc4a961
Merge branch 'refs/heads/settings-tab' into custom-install-dir
MCOfficer Jul 7, 2024
694d3be
actually make it work post-merge
MCOfficer Jul 7, 2024
2039f6a
use one install_dir setting rather than a bespoke setting for custom …
MCOfficer Jun 24, 2025
c910148
Merge branch 'master' into settings-tab
MCOfficer Jun 24, 2025
d05d6f5
fix instances.json loading
MCOfficer Jun 24, 2025
ca40844
mark the tiny-skia issue as TODO
MCOfficer Jun 24, 2025
b620267
Restore missing horizontal bar below tab bar
MCOfficer Jun 24, 2025
9b394ce
Link issue in comment
Koranir Jul 11, 2024
a34e8e2
Correct comment & button
MCOfficer Jun 28, 2025
a58efe3
Update iced (61 compile errors)
MCOfficer Jun 28, 2025
cf7f78a
Use new Row::align_y api (60 compile errors)
MCOfficer Jun 28, 2025
cc9b1bc
Use new Program api (61 compile errors)
MCOfficer Jun 28, 2025
92a03b9
Use new Task api (61 compile errors)
MCOfficer Jun 28, 2025
08081cc
Start migrating stylesheets to new API (61 compile errors)
MCOfficer Jun 29, 2025
490e232
Fully patch up generic stylesheets (51 compile errors)
MCOfficer Jun 29, 2025
d23b365
Fix Program and subscription initialization (47 compile errors)
MCOfficer Jun 29, 2025
d1b4fae
Switch to new x/y alignment methods (25 compile errors)
MCOfficer Jun 29, 2025
fb154bb
Fix the simple style errors (18 compile errors)
MCOfficer Jun 29, 2025
7caf141
use new Container::center API (15 compile errors)
MCOfficer Jun 29, 2025
e968581
Patch up remaining style errors (6 compile errors)
MCOfficer Jun 29, 2025
028714d
Switch to new image::Handle API (5 compile errors)
MCOfficer Jun 29, 2025
83dd113
Fix the last few lifetime errors (0 compile errors)
MCOfficer Jun 29, 2025
0a505ea
Fix recursive style implementations
MCOfficer Jun 29, 2025
749d4a0
Fix missing renderer & tab bar style
MCOfficer Jun 29, 2025
5525486
Implement dialogs for user interactions, start on the "move install d…
MCOfficer Jul 14, 2025
1d5c83c
Implement migrating instances (it's broken due to the racey messaging…
MCOfficer Jul 15, 2025
2683c66
Exclude spammy cosmic_text::buffer debug logs
MCOfficer Jul 15, 2025
d7366e5
Separate Settings and SettingsFrame, use Arc<RwLock<Settings>> to get…
MCOfficer Jul 19, 2025
b47a62e
Implement theme selector, yes it interferes with the custom themes
MCOfficer Jul 19, 2025
2b4ddaf
Merge branch 'master' into settings-tab
MCOfficer Jul 19, 2025
67abf82
use LazyLock instead of lazy_static (#453)
yjhn Jul 19, 2025
fcff94c
Adapt TabBar to dynamic themes
MCOfficer Jul 19, 2025
25b8f69
Use wgpu by default, fall back to tiny-skia
MCOfficer Jul 20, 2025
5d88fb4
make settings row less cramped
MCOfficer Jul 20, 2025
40bd303
preview themes when hovered
MCOfficer Jul 20, 2025
cdee35e
Start updating to iced 0.14.0-dev (iced_aw is not ready)
MCOfficer Jul 15, 2025
81305f6
replace tab bar with a dummy implementation, so we can use the iced d…
MCOfficer Jul 20, 2025
535c0d6
migrate installdir move modal to sipper (no more race conditions)
MCOfficer Sep 5, 2025
17beb8a
Proceed with moving the install dir even when executable paths are br…
MCOfficer Sep 5, 2025
ca732dd
update iced & friends to 0.14
MCOfficer Dec 18, 2025
8c076c6
Merge branch 'master' into dev
MCOfficer Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,188 changes: 2,717 additions & 1,471 deletions Cargo.lock

Large diffs are not rendered by default.

36 changes: 28 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ osx_minimum_system_version = "10.7"
[dependencies]
anyhow = "1.0"
bitar = { version = "0.12", features = ["rustls-tls"] }
time = "0.3"
cp_r = "0.5"
dark-light = "1.0"
dmg = "0.1.2"
espim = "0.2"
flate2 = "1.0"
fs_extra = "1.3.0"
futures = "0.3"
iced_aw = { git = "https://github.com/iced-rs/iced_aw.git", rev = "9ed46bffd0d819f22e07db6c282fbef733007df5", default-features = false, features = ["tabs", "icons"] }
lazy_static = "1.5"
iced_aw = { version = "0.13.0", default-features = false, features = [
"tabs",
] }
iced_dialog = "0.14.0"
log = { version = "0.4.22", features = ["std"] }
open = "5"
parking_lot = "0.12"
parse_link_header = "0.4"
platform-dirs = "0.3.0"
progress-streams = "1.1.0"
Expand All @@ -36,21 +40,37 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-xml-rs = "0.6"
simplelog = "0.12.2"
sipper = "0.1"
tar = "0.4"
time = "0.3"
tokio = { version = "1", default-features = false, features = ["fs"] }
ureq = { version = "2.10", default-features = false, features = ["json", "tls"] }
version = "3"
zip-extract = { version = "0.1.3", default-features = false, features = ["deflate"] }
zip-extract = { version = "0.1.3", default-features = false, features = [
"deflate",
] }
rfd = { version = "0.14.1", default-features = false, features = [
"tokio",
"xdg-portal",
] }

[dependencies.iced]
version = "0.12.1"
version = "0.14"
default-features = false
features = ["web-colors", "advanced", "image", "tokio"]
features = [
"web-colors",
"advanced",
"image",
"sipper",
"tokio",
"wgpu", # iced will use wgpu by default and fall back to tiny-skia
"tiny-skia",
]

[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

[profile.release]
strip = true
opt-level = 'z' # Optimize for size.
lto = true
opt-level = 'z' # Optimize for size.
lto = true
43 changes: 21 additions & 22 deletions src/install_frame.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::instance::{get_instances_dir, InstanceType};
use crate::instance::InstanceType;
use crate::style::text_button;
use crate::{instance, Message};
use crate::{instance, Message, SharedSettings};
use core::fmt;
use iced::widget::{Button, Column, Container, Radio, Scrollable, Text, TextInput};
use iced::{alignment, Alignment, Command, Element, Length};
use iced::{alignment, Alignment, Element, Length, Task};
use serde::{Deserialize, Serialize};

// Characters that shall not be allowed to enter. This does not cover all cases!
Expand Down Expand Up @@ -57,23 +57,22 @@ impl fmt::Display for InstanceSourceType {
}

impl InstallFrame {
pub fn update(&mut self, message: InstallFrameMessage) -> Command<Message> {
pub fn update(
&mut self,
message: InstallFrameMessage,
settings: SharedSettings,
) -> Task<Message> {
match message {
InstallFrameMessage::StartInstallation(instance_type) => {
if let Some(mut destination) = get_instances_dir() {
destination.push(&self.name);
return Command::perform(
instance::perform_install(
destination,
self.name.clone(),
instance_type,
self.source.clone(),
),
Message::Dummy,
);
} else {
error!("Could not get instances directory from AppDirs");
}
return Task::perform(
instance::perform_install(
settings.read().install_dir.join(&self.name),
self.name.clone(),
instance_type,
self.source.clone(),
),
Message::Dummy,
);
}
InstallFrameMessage::SourceTypeChanged(source_type) => self.source.r#type = source_type,
InstallFrameMessage::NameChanged(name) => {
Expand All @@ -87,7 +86,7 @@ impl InstallFrame {
self.source.identifier = identifier;
}
}
Command::none()
Task::none()
}

pub fn view(&self) -> Element<InstallFrameMessage> {
Expand All @@ -110,7 +109,7 @@ impl InstallFrame {
);
}

let mut install_button = Button::new(Text::new("Install")).style(text_button());
let mut install_button = Button::new(Text::new("Install")).style(text_button);
if !self.name.trim().is_empty() {
install_button =
install_button.on_press(InstallFrameMessage::StartInstallation(if cfg!(windows) {
Expand All @@ -127,7 +126,7 @@ impl InstallFrame {
.padding(20)
.push(
Text::new("Install")
.horizontal_alignment(alignment::Horizontal::Center)
.align_x(alignment::Horizontal::Center)
.width(Length::Fill)
.size(26),
)
Expand All @@ -139,7 +138,7 @@ impl InstallFrame {
.push(controls)
.push(install_button)
.spacing(20)
.align_items(Alignment::End),
.align_x(Alignment::End),
))
.width(Length::FillPortion(2))
.into()
Expand Down
Loading
Loading