refactor: remove embedded wallpaper from binary (v0.6.2)
Wallpaper is installed by moonarch to /usr/share/moonarch/wallpaper.jpg. Embedding a 374K JPEG in the binary was redundant. Without a wallpaper file, GTK background color (Catppuccin Mocha base) shows through.
This commit is contained in:
+6
-6
@@ -40,16 +40,16 @@ fn activate(app: >k::Application) {
|
||||
load_css(&display);
|
||||
|
||||
let config = config::load_config(None);
|
||||
let bg_path = config::resolve_background_path(&config);
|
||||
let bg_texture = lockscreen::load_background_texture(&bg_path);
|
||||
let bg_texture = config::resolve_background_path(&config)
|
||||
.and_then(|path| lockscreen::load_background_texture(&path));
|
||||
|
||||
if gtk4_session_lock::is_supported() {
|
||||
activate_with_session_lock(app, &display, &bg_texture, &config);
|
||||
activate_with_session_lock(app, &display, bg_texture.as_ref(), &config);
|
||||
} else {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
log::warn!("ext-session-lock-v1 not supported — running in development mode");
|
||||
activate_without_lock(app, &bg_texture, &config);
|
||||
activate_without_lock(app, bg_texture.as_ref(), &config);
|
||||
}
|
||||
#[cfg(not(debug_assertions))]
|
||||
{
|
||||
@@ -62,7 +62,7 @@ fn activate(app: >k::Application) {
|
||||
fn activate_with_session_lock(
|
||||
app: >k::Application,
|
||||
display: &gdk::Display,
|
||||
bg_texture: &gdk::Texture,
|
||||
bg_texture: Option<&gdk::Texture>,
|
||||
config: &config::Config,
|
||||
) {
|
||||
let lock = gtk4_session_lock::Instance::new();
|
||||
@@ -158,7 +158,7 @@ fn init_fingerprint_async(all_handles: Vec<lockscreen::LockscreenHandles>) {
|
||||
#[cfg(debug_assertions)]
|
||||
fn activate_without_lock(
|
||||
app: >k::Application,
|
||||
bg_texture: &gdk::Texture,
|
||||
bg_texture: Option<&gdk::Texture>,
|
||||
config: &config::Config,
|
||||
) {
|
||||
let app_clone = app.clone();
|
||||
|
||||
Reference in New Issue
Block a user