feat(gui): branded app icon in the sidebar header and login

The sidebar header and the login page used the generic folder-remote-symbolic
icon. Ship the app icon from packaging/ in the GUI resources and use it in
both places, so the in-app brand matches the launcher even when the app runs
uninstalled.
This commit is contained in:
nvrl committed 2026-09-27 23:28:00 +02:00
1 parent 7470bd89f3
commit 0b81b76cb7
5 files changed
+8 -6

No files matched your search

+1
View File
@@ -26,4 +26,5 @@ fn main() {
println!("cargo:rerun-if-changed=resources/pdfs.gresource.xml");
println!("cargo:rerun-if-changed=resources/icons");
println!("cargo:rerun-if-changed=resources/style.css");
println!("cargo:rerun-if-changed=../../packaging/io.narl.proton-drive-linux.svg");
}
@@ -9,6 +9,9 @@
<file preprocess="xml-stripblanks">scalable/actions/pdfs-upload-symbolic.svg</file>
<file preprocess="xml-stripblanks">scalable/actions/pdfs-offline-symbolic.svg</file>
<file preprocess="xml-stripblanks">scalable/actions/pdfs-online-only-symbolic.svg</file>
<!-- The app icon, from the one file packaging installs, so the in-app brand
matches the launcher and resolves even when nothing is installed. -->
<file alias="scalable/apps/io.narl.proton-drive-linux.svg" preprocess="xml-stripblanks">../../../packaging/io.narl.proton-drive-linux.svg</file>
</gresource>
<!-- The app stylesheet, loaded once at startup. Colours come from the
libadwaita palette so the app follows the system accent, light/dark and
-1
View File
@@ -9,7 +9,6 @@
/* Brand */
.brand-title { font-size: 1.6rem; font-weight: 800; }
.brand-icon { color: #6d4aff; }
/* Sidebar footer */
.sidebar-footer { padding: 6px 12px 12px 12px; }
+2 -2
View File
@@ -884,8 +884,8 @@ fn build_sidebar(footer: &gtk4::Box) -> (adw::NavigationPage, gtk4::ListBox) {
});
let brand = gtk4::Box::new(gtk4::Orientation::Horizontal, 8);
let icon = gtk4::Image::from_icon_name("folder-remote-symbolic");
icon.add_css_class("brand-icon");
let icon = gtk4::Image::from_icon_name(APP_ID);
icon.set_pixel_size(24);
brand.append(&icon);
let name = gtk4::Label::new(Some("Proton Drive"));
name.add_css_class("heading");
+2 -3
View File
@@ -52,9 +52,8 @@ pub(crate) fn build_login_page() -> (gtk4::Widget, LoginState) {
login_status.add_css_class("dim-label");
let header = gtk4::Box::new(gtk4::Orientation::Vertical, 4);
let logo = gtk4::Image::from_icon_name("folder-remote-symbolic");
logo.set_pixel_size(64);
logo.add_css_class("brand-icon");
let logo = gtk4::Image::from_icon_name(APP_ID);
logo.set_pixel_size(96);
let title = gtk4::Label::new(Some("Proton Drive"));
title.add_css_class("brand-title");
header.append(&logo);