Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions src/pages/installationtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ page!(InstallationType {
InstallationType::Custom => Page::InstallCustom,
}
}));
// XXX: we shouldn't need to make this an overlay
//
// it doesn't make sense
// it makes zero fucking sense
// it ruins UX, its ugly, but its the ONLY way to get it to even display
// - @korewaChino
// --- IGNORE ---

if INSTALLATION_STATE.read().encrypt {
if let Some(dialog_ctrl) = self.dialog_child.as_ref() {
let dialog_widget = dialog_ctrl.widget().clone();
Expand Down
48 changes: 22 additions & 26 deletions src/pages/installcustom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,13 @@ impl SimpleComponent for InstallCustomPage {
set_vexpand: true,
set_hexpand: true,

gtk::ScrolledWindow {
#[local_ref]
mounts -> gtk::Box {
set_margin_horizontal: 16,
set_spacing: 8,
set_orientation: gtk::Orientation::Vertical,
add_css_class: "content-list",
set_vexpand: true,
set_hexpand: true,
set_valign: gtk::Align::Center,
set_halign: gtk::Align::Fill,
}
},

// FIXME: help me position this button!!!!

libhelium::OverlayButton {
set_valign: gtk::Align::End,
set_halign: gtk::Align::End,

set_typeb: libhelium::OverlayButtonTypeButton::Primary,
set_icon: "go-next",
connect_clicked => InstallCustomPageMsg::Navigate(NavigationAction::GoTo(crate::Page::Confirmation)),
},


#[name(scrolled_window)]
gtk::ScrolledWindow {},

#[name(bottom_bar)]
libhelium::BottomBar {
set_mode: libhelium::BottomBarMode::Floating,

#[watch]
set_title: &t!("page-installcustom-title"),

Expand All @@ -115,6 +94,14 @@ impl SimpleComponent for InstallCustomPage {
connect_clicked => InstallCustomPageMsg::AddRow,
},
},

#[name(next_button)]
libhelium::OverlayButton {
set_typeb: libhelium::OverlayButtonTypeButton::Primary,
set_icon: "go-next",
connect_clicked => InstallCustomPageMsg::Navigate(NavigationAction::GoTo(crate::Page::Confirmation)),
set_visible: false,
},
},
}
}
Expand All @@ -136,6 +123,15 @@ impl SimpleComponent for InstallCustomPage {
let mounts = model.choose_mount_factory.widget();
let widgets = view_output!();

let mounts_widget: &gtk::Widget = mounts.upcast_ref();
widgets.scrolled_window.set_child(Some(mounts_widget));
widgets
.bottom_bar
.set_overlay_widget(Some(&widgets.scrolled_window));
widgets
.bottom_bar
.set_overlay_button(Some(&widgets.next_button));

INSTALLATION_STATE.subscribe(sender.input_sender(), |_| InstallCustomPageMsg::Update);

ComponentParts { model, widgets }
Expand Down