Some checks are pending
Release Multiplatform Binaries / build (deb,appimage, linux-x86_64, ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-arm64, macos-14, aarch64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-x86_64, macos-14, x86_64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (nsis, windows-x86_64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Release Multiplatform Binaries / create-release (push) Blocked by required conditions
- Rebased onto official Polyfrost OneLauncher v2.3.1 (commit 0e49c691)
- Preserved 100% offline authentication without requiring Microsoft accounts
- Integrated custom 3D offline skin changer with UUID character slot targeting
- Maintained CustomSkinLoader auto-configuration for Ely.by and SkinRestorer
- Maintained direct GitHub Releases auto-updater pointing to oiupoyt/OneLauncher-Cracked
- Maintained mods filter popover fix eliminating text ghosting/duplication
- Configured dev profile to prevent debug symbol bloat
60 lines
1.5 KiB
Rust
60 lines
1.5 KiB
Rust
mod app_navbar;
|
|
mod onboarding_navbar;
|
|
|
|
pub use app_navbar::Navbar as AppNavbar;
|
|
pub use onboarding_navbar::OnboardingNavbar;
|
|
|
|
use freya::prelude::*;
|
|
|
|
use crate::components::{Button, Icon, IconType};
|
|
|
|
pub(super) fn navbar_button() -> Button {
|
|
Button::new()
|
|
.ghost()
|
|
.icon()
|
|
.width(Size::px(36.))
|
|
.height(Size::px(36.))
|
|
}
|
|
|
|
pub fn window_controls() -> impl IntoElement {
|
|
let minimize = |_| {
|
|
Platform::get().with_window(Platform::window_id(), |win| {
|
|
win.set_minimized(true);
|
|
});
|
|
};
|
|
|
|
let maximize = |_| {
|
|
Platform::get().with_window(Platform::window_id(), |win| {
|
|
win.set_maximized(!win.is_maximized());
|
|
});
|
|
};
|
|
|
|
let close = |_| {
|
|
let platform = Platform::get();
|
|
Platform::get().with_window(Platform::window_id(), move |window| {
|
|
platform.close_window(window.id());
|
|
});
|
|
};
|
|
|
|
rect()
|
|
.horizontal()
|
|
.main_align(Alignment::End)
|
|
.cross_align(Alignment::Center)
|
|
.spacing(8.)
|
|
.layer(Layer::OverlayLevel(15))
|
|
.child(
|
|
navbar_button()
|
|
.child(Icon::new(IconType::Minus))
|
|
.on_press(minimize),
|
|
)
|
|
.child(
|
|
navbar_button()
|
|
.child(Icon::new(IconType::Maximize01).size(20.))
|
|
.on_press(maximize),
|
|
)
|
|
.child(
|
|
navbar_button()
|
|
.child(Icon::new(IconType::X))
|
|
.on_press(close),
|
|
)
|
|
}
|