diff --git a/crates/pdfs-gui/src/app/main.rs b/crates/pdfs-gui/src/app/main.rs index b2a5b99..1400359 100644 --- a/crates/pdfs-gui/src/app/main.rs +++ b/crates/pdfs-gui/src/app/main.rs @@ -652,6 +652,7 @@ fn build_window(app: &adw::Application) { select_btn: gallery_widgets.select_btn.clone(), selection: gallery_widgets.selection.clone(), more: gallery_widgets.more.clone(), + gallery_actions: gallery_widgets.gallery_actions.clone(), upload_face: gallery_widgets.upload_face.clone(), float_heading: gallery_widgets.float_heading.clone(), float_label: gallery_widgets.float_label.clone(), diff --git a/crates/pdfs-gui/src/app/pages/drive_galleries.rs b/crates/pdfs-gui/src/app/pages/drive_galleries.rs index e35a041..14ef016 100644 --- a/crates/pdfs-gui/src/app/pages/drive_galleries.rs +++ b/crates/pdfs-gui/src/app/pages/drive_galleries.rs @@ -552,7 +552,7 @@ impl Browser { if self.chooser.borrow().is_some() { return; } - let width = (self.width.get() - 24).max(240); + let width = self.width.get().max(240); let columns = ((width + 8) / 216).max(1); let card = (width - 8 * (columns - 1)) / columns; let mut rows = Vec::new(); @@ -683,13 +683,15 @@ pub(crate) fn wire( hidden: >k4::Button, ) { let title = ui.gallery.title.clone(); - let header = gtk4::Box::new(gtk4::Orientation::Horizontal, 8); - header.set_halign(gtk4::Align::End); + // The page's header bar holds these, beside Select (see `sync_header`). + let header = &ui.gallery.gallery_actions; let choose = gtk4::Button::with_label(&gettext("Add This Folder")); choose.set_visible(false); + choose.add_css_class("suggested-action"); header.append(&choose); let more = gtk4::Button::from_icon_name("view-more-symbolic"); more.set_tooltip_text(Some(&gettext("Gallery Options"))); + more.add_css_class("flat"); let unlock = gtk4::Button::with_label(&gettext("Unlock")); unlock.set_visible(false); header.append(&unlock); @@ -709,7 +711,6 @@ pub(crate) fn wire( let status = gtk4::Label::new(None); status.set_wrap(true); let content = gtk4::Box::new(gtk4::Orientation::Vertical, 0); - content.append(&header); content.append(&status); content.append(&scroll); ui.gallery @@ -794,12 +795,13 @@ pub(crate) fn wire( return; }; let row = data.borrow::(); + // The page around the list already keeps its margins, so rows run edge + // to edge like the timeline's. let line = gtk4::Box::new(gtk4::Orientation::Horizontal, 8); - line.set_margin_start(12); - line.set_margin_end(12); line.set_margin_bottom(8); match &*row { Row::Heading(label) => { + line.set_margin_top(12); let label = gtk4::Label::new(Some(label)); label.add_css_class("heading"); line.append(&label); @@ -841,7 +843,9 @@ pub(crate) fn wire( } } Row::Media(items) => { + // The same gap down as across, as in the timeline. line.set_spacing(super::photos::TILE_GAP); + line.set_margin_bottom(super::photos::TILE_GAP); for (item, (width, height)) in items { let button = tile( &browser, @@ -918,11 +922,6 @@ pub(crate) fn wire( let browser = browser.clone(); move || browser.close() }); - } else { - menu.item(&gettext("Refresh galleries"), { - let browser = browser.clone(); - move || browser.change(GalleryAction::Refresh) - }); } if let Some(album) = browser.current().filter(|album| !album.proton) { menu.item(&gettext("Choose Cover"), { diff --git a/crates/pdfs-gui/src/app/pages/photos.rs b/crates/pdfs-gui/src/app/pages/photos.rs index 0c31057..830a203 100644 --- a/crates/pdfs-gui/src/app/pages/photos.rs +++ b/crates/pdfs-gui/src/app/pages/photos.rs @@ -225,6 +225,9 @@ pub(crate) struct GalleryState { /// The header's page menu and the Upload button's face, which drops its /// label in a narrow window. pub(crate) more: gtk4::MenuButton, + /// The header's end slot for an open Drive gallery's own buttons (Add + /// This Folder, Unlock, options), filled by the Drive gallery browser. + pub(crate) gallery_actions: gtk4::Box, pub(crate) upload_face: adw::ButtonContent, /// The section the top of the timeline is in, floating over the grid /// once its own heading has scrolled away. @@ -524,6 +527,7 @@ pub(crate) struct GalleryWidgets { pub(crate) select_btn: gtk4::Button, pub(crate) selection: SelectionBar, pub(crate) more: gtk4::MenuButton, + pub(crate) gallery_actions: gtk4::Box, pub(crate) upload_face: adw::ButtonContent, pub(crate) float_heading: gtk4::Revealer, pub(crate) float_label: gtk4::Label, @@ -694,6 +698,12 @@ pub(crate) fn build_gallery_page() -> (gtk4::Widget, GalleryWidgets) { .build(); more.add_css_class("flat"); + // An open Drive gallery's own buttons live in the header too, not in a row + // of their own above its grid: that row took height from the photos and + // left its button touching the first row of tiles. + let gallery_actions = gtk4::Box::new(gtk4::Orientation::Horizontal, 6); + gallery_actions.set_visible(false); + // Picking photos is a mode: the button enters it, and the header then // trades the page's own controls for Cancel and a count, as GNOME apps do. let select_btn = gtk4::Button::builder() @@ -1002,6 +1012,7 @@ pub(crate) fn build_gallery_page() -> (gtk4::Widget, GalleryWidgets) { header.pack_start(&back); header.pack_start(&upload); header.pack_end(&more); + header.pack_end(&gallery_actions); header.pack_end(&select_btn); header.pack_end(&selection.cancel); @@ -1031,6 +1042,7 @@ pub(crate) fn build_gallery_page() -> (gtk4::Widget, GalleryWidgets) { select_btn, selection, more, + gallery_actions, upload_face, float_heading, float_label, @@ -1141,6 +1153,7 @@ pub(crate) fn sync_header(ui: &Rc) { gallery.back.set_visible(!selecting && collection); gallery.upload.set_visible(!selecting && !collection); gallery.more.set_visible(!selecting && !galleries); + gallery.gallery_actions.set_visible(!selecting && galleries); gallery.select_btn.set_visible(!selecting && timeline); gallery.selection.title.set_visible(selecting); gallery.selection.cancel.set_visible(selecting); diff --git a/po/de.po b/po/de.po index 871246a..a9ec152 100644 --- a/po/de.po +++ b/po/de.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: proton-drive-linux 2.1.0\n" "Report-Msgid-Bugs-To: https://github.com/narrrl/proton-drive-linux/issues\n" -"POT-Creation-Date: 2026-11-20 02:44+0100\n" +"POT-Creation-Date: 2026-11-20 19:24+0100\n" "PO-Revision-Date: 2026-09-23 12:00+0200\n" "Last-Translator: Proton Drive for Linux contributors\n" "Language-Team: German\n" @@ -31,7 +31,7 @@ msgstr[1] "vor {n} Min." #. Translators: strftime format for the time a photo was taken, shown on its tile, such as "14:05". #: crates/pdfs-gui/src/app/dates.rs:44 #: crates/pdfs-gui/src/app/pages/activity.rs:840 -#: crates/pdfs-gui/src/app/pages/photos.rs:3945 +#: crates/pdfs-gui/src/app/pages/photos.rs:3958 msgid "%H:%M" msgstr "%H:%M" @@ -57,7 +57,7 @@ msgstr "%-d. %b %Y" msgid "%A, %B %-d, %Y, %H:%M" msgstr "%A, %-d. %B %Y, %H:%M" -#: crates/pdfs-gui/src/app/main.rs:959 +#: crates/pdfs-gui/src/app/main.rs:960 #: crates/pdfs-gui/src/app/pages/activity_text.rs:543 #: crates/pdfs-gui/src/app/pages/browser.rs:473 #: crates/pdfs-gui/src/app/pages/browser.rs:880 @@ -70,37 +70,37 @@ msgstr "%A, %-d. %B %Y, %H:%M" msgid "My files" msgstr "Meine Dateien" -#: crates/pdfs-gui/src/app/main.rs:960 crates/pdfs-gui/src/app/main.rs:1641 +#: crates/pdfs-gui/src/app/main.rs:961 crates/pdfs-gui/src/app/main.rs:1642 #: crates/pdfs-gui/src/app/pages/albums.rs:657 -#: crates/pdfs-gui/src/app/pages/photos.rs:993 +#: crates/pdfs-gui/src/app/pages/photos.rs:1003 #: crates/pdfs-gui/src/app/pages/places.rs:473 msgid "Photos" msgstr "Fotos" -#: crates/pdfs-gui/src/app/main.rs:963 +#: crates/pdfs-gui/src/app/main.rs:964 #: crates/pdfs-gui/src/app/pages/shared.rs:168 #: crates/pdfs-gui/src/app/pages/shared.rs:493 msgid "Shared with me" msgstr "Mit mir geteilt" -#: crates/pdfs-gui/src/app/main.rs:968 +#: crates/pdfs-gui/src/app/main.rs:969 #: crates/pdfs-gui/src/app/pages/shared_by_me.rs:120 msgid "Shared by me" msgstr "Von mir geteilt" -#: crates/pdfs-gui/src/app/main.rs:971 +#: crates/pdfs-gui/src/app/main.rs:972 #: crates/pdfs-gui/src/app/pages/devices.rs:140 #: crates/pdfs-gui/src/app/pages/devices.rs:505 msgid "Computers" msgstr "Computer" -#: crates/pdfs-gui/src/app/main.rs:972 +#: crates/pdfs-gui/src/app/main.rs:973 #: crates/pdfs-gui/src/app/pages/trash.rs:101 msgid "Trash" msgstr "Papierkorb" #. Translators: sidebar entry for the page listing this computer's synced folders. -#: crates/pdfs-gui/src/app/main.rs:974 +#: crates/pdfs-gui/src/app/main.rs:975 #: crates/pdfs-gui/src/app/pages/preferences_sync.rs:66 msgid "Sync" msgstr "Synchronisierung" @@ -108,7 +108,7 @@ msgstr "Synchronisierung" #. Translators: a failed action's toast. {what} says what failed, such as #. "Couldn't rename"; {detail} is the reason, usually untranslated text #. from the mount service. -#: crates/pdfs-gui/src/app/main.rs:1324 +#: crates/pdfs-gui/src/app/main.rs:1325 #: crates/pdfs-gui/src/app/pages/photo_viewer.rs:948 #: crates/pdfs-gui/src/app/pages/preferences_apps.rs:284 #: crates/pdfs-gui/src/app/pages/preferences_sync.rs:175 @@ -121,31 +121,31 @@ msgstr "Synchronisierung" msgid "{what}: {detail}" msgstr "{what}: {detail}" -#: crates/pdfs-gui/src/app/main.rs:1347 +#: crates/pdfs-gui/src/app/main.rs:1348 msgid "You're offline" msgstr "Keine Internetverbindung" -#: crates/pdfs-gui/src/app/main.rs:1348 +#: crates/pdfs-gui/src/app/main.rs:1349 msgid "That's not there any more" msgstr "Das ist nicht mehr vorhanden" -#: crates/pdfs-gui/src/app/main.rs:1349 +#: crates/pdfs-gui/src/app/main.rs:1350 msgid "You don't have access to that" msgstr "Kein Zugriff darauf" -#: crates/pdfs-gui/src/app/main.rs:1350 +#: crates/pdfs-gui/src/app/main.rs:1351 msgid "Something changed this first" msgstr "Etwas anderes hat dies zuerst geändert" -#: crates/pdfs-gui/src/app/main.rs:1351 +#: crates/pdfs-gui/src/app/main.rs:1352 msgid "Your Proton Drive is full" msgstr "Das Proton Drive ist voll" -#: crates/pdfs-gui/src/app/main.rs:1438 +#: crates/pdfs-gui/src/app/main.rs:1439 msgid "Proton Drive for Linux" msgstr "Proton Drive for Linux" -#: crates/pdfs-gui/src/app/main.rs:1446 +#: crates/pdfs-gui/src/app/main.rs:1447 msgid "" "Files-on-demand Proton Drive for the Linux desktop.\n" "\n" @@ -157,23 +157,23 @@ msgstr "" "Inoffizieller Client – nicht mit Proton AG verbunden, von Proton AG " "unterstützt oder befürwortet." -#: crates/pdfs-gui/src/app/main.rs:1451 +#: crates/pdfs-gui/src/app/main.rs:1452 msgid "Source Code" msgstr "Quellcode" -#: crates/pdfs-gui/src/app/main.rs:1455 +#: crates/pdfs-gui/src/app/main.rs:1456 msgid "Proton Terms of Service" msgstr "Nutzungsbedingungen von Proton" -#: crates/pdfs-gui/src/app/main.rs:1459 +#: crates/pdfs-gui/src/app/main.rs:1460 msgid "Proton Privacy Policy" msgstr "Datenschutzerklärung von Proton" -#: crates/pdfs-gui/src/app/main.rs:1464 +#: crates/pdfs-gui/src/app/main.rs:1465 msgid "Disclaimer" msgstr "Haftungsausschluss" -#: crates/pdfs-gui/src/app/main.rs:1468 +#: crates/pdfs-gui/src/app/main.rs:1469 msgid "" "This is an unofficial, community-built client. It is not affiliated with, " "endorsed by, or supported by Proton AG.\n" @@ -198,7 +198,7 @@ msgstr "" "bereitgestellt. Daten, deren Verlust nicht hinnehmbar ist, sollten " "zusätzlich gesichert werden." -#: crates/pdfs-gui/src/app/main.rs:1476 +#: crates/pdfs-gui/src/app/main.rs:1477 msgid "" "Places are named with data from GeoNames, licensed under GeoNames, lizenziert unter CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -218,7 +218,7 @@ msgstr "" "href=\"https://www.naturalearthdata.com/\">Natural Earth gezeichnet, die " "gemeinfrei sind." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, licensed under CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -215,7 +215,7 @@ msgstr "" "\">Natural Earth land outlines and country borders, which are in the " "public domain." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, con licencia CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -216,7 +216,7 @@ msgstr "" "fronteras de países de Natural " "Earth, que son de dominio público." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, sous licence CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -217,7 +217,7 @@ msgstr "" "frontières des pays de Natural " "Earth, qui sont dans le domaine public." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, con licenza CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -215,7 +215,7 @@ msgstr "" "confini nazionali di Natural " "Earth, che sono di pubblico dominio." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, gelicentieerd onder CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -216,7 +216,7 @@ msgstr "" "href=\"https://www.naturalearthdata.com/\">Natural Earth, die in het " "publieke domein vallen." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the GeoNames, licensed under CC BY 4.0." msgstr "" -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " "public domain." msgstr "" -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames udostępnionych na licencji CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -219,7 +219,7 @@ msgstr "" "www.naturalearthdata.com/\">Natural Earth, które należą do domeny " "publicznej." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the , licensed under GeoNames, licenciados sob CC BY 4.0." -#: crates/pdfs-gui/src/app/main.rs:1484 +#: crates/pdfs-gui/src/app/main.rs:1485 msgid "" "The places map is drawn from Natural Earth land outlines and country borders, which are in the " @@ -215,7 +215,7 @@ msgstr "" "fronteiras de países do Natural Earth, que são de domínio público." -#: crates/pdfs-gui/src/app/main.rs:1492 +#: crates/pdfs-gui/src/app/main.rs:1493 msgid "" "The street map, when turned on, comes from OpenFreeMap in the