From 3111efdd940a22ef08a593a261a70876df15ed50 Mon Sep 17 00:00:00 2001 From: qwel Date: Sat, 10 Jun 2023 23:43:09 +0200 Subject: [PATCH 1/5] window: First work for drag overlay visuals Issue #59 Part-of: --- data/gtk/window.ui | 63 ++++++++++++++++++++++------------------ data/resources/style.css | 9 ++++++ src/window.rs | 63 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 28 deletions(-) diff --git a/data/gtk/window.ui b/data/gtk/window.ui index 8d4944fc..4665cee7 100644 --- a/data/gtk/window.ui +++ b/data/gtk/window.ui @@ -168,46 +168,53 @@ True - - status_page - True + + - - View Images - Drag and drop images here - - - center - _Open Files… - True - win.open - - - + + copy - + + status_page + True - - 9 + + View Images + Drag and drop images here + + + center + _Open Files… + True + win.open + + + - - 8 + + + + 9 + + + + + 8 + + - - - copy - - diff --git a/data/resources/style.css b/data/resources/style.css index 6a6a0db5..96412e32 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -29,6 +29,15 @@ row.property label.subtitle { box-shadow: 0 0 10px rgba(0, 0, 0, 200); } +.custom-drag-n-drop-highlight { + box-shadow: none; +} +.lp-dragging-area-highlight { + border-radius: 8px; + background-color: alpha(@accent_color, 0.35); + border: 2px @accent_color solid; +} + lpprintpreview { background-color: rgb(240, 240, 240); border-radius: 4px; diff --git a/src/window.rs b/src/window.rs index 3f37b29e..2d43d066 100644 --- a/src/window.rs +++ b/src/window.rs @@ -88,8 +88,12 @@ mod imp { pub(super) image_view: TemplateChild, #[template_child] pub(super) properties_view: TemplateChild, + + #[template_child] + pub(super) drop_area_overlay: TemplateChild, #[template_child] pub(super) drop_target: TemplateChild, + pub(super) drop_area_highlight_widget: OnceCell, #[template_child] pub(super) forward_click_gesture: TemplateChild, @@ -374,12 +378,41 @@ mod imp { self.drop_target.set_types(&[gdk::FileList::static_type()]); + // # Drag and drop stuff --- + + // - Define widget used as a visual cue for users trying to drag-n-drop + self.drop_area_highlight_widget.set({ + const MARGIN: i32 = 24; + gtk::Box::builder() + .margin_top(MARGIN).margin_bottom(MARGIN).margin_start(MARGIN).margin_end(MARGIN) + .css_classes(["lp-dragging-area-highlight"]) + .can_target(false) + .build() + .upcast() // Upcasting to fit into the required `gtk::Widget` type + }).expect("Drop area highlight widget was defined twice"); + + // - Adds the widget on drag enter + self.drop_target.connect_enter( + clone!(@weak obj => @default-return gdk::DragAction::COPY, move |_drop_target, _x, _y| { + obj.toggle_drop_area_highlight(true); + gdk::DragAction::COPY + }) + ); + + // - Removes the widget on drag leave + self.drop_target.connect_leave(clone!(@weak obj => move |_drop_target| { + obj.toggle_drop_area_highlight(false); + })); + // For callbacks, you will want to reference the GTK docs on // the relevant signal to see which parameters you need. // In this case, we need only need the GValue, // so we name it `value` then use `_` for the other spots. self.drop_target.connect_drop( clone!(@weak obj => @default-return false, move |_, value, _, _| { + // - Removes the widget on drag completion + obj.toggle_drop_area_highlight(false); + // Here we use a GValue, which is a dynamic object that can hold different types, // e.g. strings, numbers, or in this case objects. In order to get the GdkFileList // from the GValue, we need to use the `get()` method. @@ -916,6 +949,36 @@ impl LpWindow { && (!self.is_headerbar_flat() || !self.imp().headerbar_events.contains_pointer()) } + /// Displays visual feedback for users trying to drag and drop + fn toggle_drop_area_highlight(&self, display: bool) { + let overlay = &self.imp().drop_area_overlay; + let widget = self.imp().drop_area_highlight_widget.get() + .expect("`drop_area_highlight_widget` needs to be defined before being toggled"); + + // Create fade in animation. Will be reversed to make a fade-out. + let animation = adw::TimedAnimation::new( + widget, 0.0, 1.0, 250, adw::PropertyAnimationTarget::new(widget, "opacity") + ); + + if display && widget.parent().is_none() { + // Overlay widget + overlay.add_overlay(widget); + // Hide controls to avoid messy superpositions + self.hide_controls() + } else if !display && widget.parent().is_some() { + // Reverse the fade-in animation + animation.set_reverse(true); + // Remove overlay after animation end + animation.connect_done(|animation| { + let widget = animation.widget(); + let overlay = widget.parent().and_downcast::().unwrap(); + overlay.remove_overlay(&widget); + }); + }; + + animation.play(); + } + #[template_callback] fn on_fullscreened(&self) { if !self.is_fullscreened() { -- GitLab From 78b16518e5a7b63dcc1877f52589641cde0b234d Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sun, 25 Jun 2023 21:13:56 +0200 Subject: [PATCH 2/5] window: Use custom overlay visual for drop target Closes #59 Part-of: --- data/gtk/window.ui | 31 +++++---- data/resources/style.css | 10 +-- po/POTFILES.in | 1 + src/widgets/drag_overlay.rs | 121 ++++++++++++++++++++++++++++++++++++ src/widgets/mod.rs | 2 + src/window.rs | 80 +++++++----------------- 6 files changed, 171 insertions(+), 74 deletions(-) create mode 100644 src/widgets/drag_overlay.rs diff --git a/data/gtk/window.ui b/data/gtk/window.ui index 4665cee7..51db83d5 100644 --- a/data/gtk/window.ui +++ b/data/gtk/window.ui @@ -97,7 +97,7 @@ - " + @@ -168,19 +168,28 @@ True - - - - - copy + + + + 24 + 24 + 24 + 24 + false + - - + + status_page True + + + copy + + View Images @@ -214,7 +223,7 @@ - + diff --git a/data/resources/style.css b/data/resources/style.css index 96412e32..4a339da9 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -8,7 +8,9 @@ button.osd.circular { background: rgba(0, 0, 0, 0.65); } -shadow, border, outline { +shadow, +border, +outline { background: none; } @@ -32,14 +34,14 @@ row.property label.subtitle { .custom-drag-n-drop-highlight { box-shadow: none; } + .lp-dragging-area-highlight { border-radius: 8px; - background-color: alpha(@accent_color, 0.35); - border: 2px @accent_color solid; + background-color: alpha(@blue_2, 0.35); } lpprintpreview { background-color: rgb(240, 240, 240); border-radius: 4px; box-shadow: 0 0 14px 1px black; -} +} \ No newline at end of file diff --git a/po/POTFILES.in b/po/POTFILES.in index 82000d20..57f53c3a 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -20,6 +20,7 @@ src/image_metadata/obj.rs src/main.rs src/util/gettext.rs src/util/mod.rs +src/widgets/drag_overlay.rs src/widgets/image.rs src/widgets/image_page.rs src/widgets/image_view.rs diff --git a/src/widgets/drag_overlay.rs b/src/widgets/drag_overlay.rs new file mode 100644 index 00000000..cd622f8a --- /dev/null +++ b/src/widgets/drag_overlay.rs @@ -0,0 +1,121 @@ +// Copyright (c) 2022 Maximiliano Sandoval R +// Copyright (c) 2023 FineFindus +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// SPDX-License-Identifier: GPL-3.0-or-later + +use gtk::{glib, prelude::*}; + +mod imp { + use std::cell::RefCell; + + use adw::subclass::prelude::*; + use glib::{ParamSpec, Properties, Value}; + + use super::*; + + #[derive(Debug, Default, Properties)] + #[properties(wrapper_type = super::LpDragOverlay)] + pub struct LpDragOverlay { + /// Usual content + #[property(set = Self::set_child)] + pub child: Option, + /// Widget overplayed when dragging over child + #[property(set = Self::set_overlayed)] + pub overlayed: Option, + pub overlay: gtk::Overlay, + pub revealer: gtk::Revealer, + #[property(set = Self::set_drop_target, get, explicit_notify)] + pub drop_target: RefCell>, + pub handler_id: RefCell>, + } + + #[glib::object_subclass] + impl ObjectSubclass for LpDragOverlay { + const NAME: &'static str = "LpDragOverlay"; + type Type = super::LpDragOverlay; + type ParentType = adw::Bin; + } + + impl ObjectImpl for LpDragOverlay { + fn properties() -> &'static [ParamSpec] { + Self::derived_properties() + } + + fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec) { + self.derived_set_property(id, value, pspec) + } + + fn property(&self, id: usize, pspec: &ParamSpec) -> Value { + self.derived_property(id, pspec) + } + + fn constructed(&self) { + self.overlay.set_parent(&*self.obj()); + self.overlay.add_overlay(&self.revealer); + + self.revealer.set_can_target(false); + self.revealer + .set_transition_type(gtk::RevealerTransitionType::Crossfade); + self.revealer.set_reveal_child(false); + } + + fn dispose(&self) { + self.overlay.unparent(); + } + } + impl WidgetImpl for LpDragOverlay {} + impl BinImpl for LpDragOverlay {} + + impl LpDragOverlay { + pub fn set_child(&self, child: Option) { + self.overlay.set_child(child.as_ref()); + } + + pub fn set_overlayed(&self, overlayed: Option) { + self.revealer.set_child(overlayed.as_ref()); + } + + pub fn set_drop_target(&self, drop_target: >k::DropTarget) { + if let Some(target) = self.drop_target.borrow_mut().take() { + self.obj().remove_controller(&target); + + if let Some(handler_id) = self.handler_id.borrow_mut().take() { + target.disconnect(handler_id); + } + } + + let handler_id = drop_target.connect_current_drop_notify( + glib::clone!(@weak self.revealer as revealer => move |target| { + let reveal = target.current_drop().is_some(); + revealer.set_reveal_child(reveal); + }), + ); + self.handler_id.replace(Some(handler_id)); + + // avoid `gtk_event_controller_get_widget (controller) == NULL` failing + if drop_target.widget().is_visible() { + self.obj().add_controller(drop_target.clone()); + self.drop_target.replace(Some(drop_target.clone())); + self.obj().notify("drop-target"); + } + } + } +} + +glib::wrapper! { + pub struct LpDragOverlay(ObjectSubclass) + @extends gtk::Widget, adw::Bin; +} diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 389d059d..09087860 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -16,6 +16,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +mod drag_overlay; mod image; mod image_page; mod image_view; @@ -24,6 +25,7 @@ mod print_preview; mod properties_view; mod sliding_view; +pub use drag_overlay::LpDragOverlay; pub use image::LpImage; pub use image_page::LpImagePage; pub use image_view::LpImageView; diff --git a/src/window.rs b/src/window.rs index 2d43d066..828a7048 100644 --- a/src/window.rs +++ b/src/window.rs @@ -35,7 +35,7 @@ use std::path::{Path, PathBuf}; use crate::config; use crate::util::{self, Direction, Position}; -use crate::widgets::{LpImage, LpImageView, LpPropertiesView}; +use crate::widgets::{LpDragOverlay, LpImage, LpImageView, LpPropertiesView}; /// Show window after X milliseconds even if image dimensions are not known yet const SHOW_WINDOW_AFTER: u64 = 2000; @@ -90,10 +90,9 @@ mod imp { pub(super) properties_view: TemplateChild, #[template_child] - pub(super) drop_area_overlay: TemplateChild, + pub(super) drag_overlay: TemplateChild, #[template_child] pub(super) drop_target: TemplateChild, - pub(super) drop_area_highlight_widget: OnceCell, #[template_child] pub(super) forward_click_gesture: TemplateChild, @@ -378,40 +377,32 @@ mod imp { self.drop_target.set_types(&[gdk::FileList::static_type()]); - // # Drag and drop stuff --- - - // - Define widget used as a visual cue for users trying to drag-n-drop - self.drop_area_highlight_widget.set({ - const MARGIN: i32 = 24; - gtk::Box::builder() - .margin_top(MARGIN).margin_bottom(MARGIN).margin_start(MARGIN).margin_end(MARGIN) - .css_classes(["lp-dragging-area-highlight"]) - .can_target(false) - .build() - .upcast() // Upcasting to fit into the required `gtk::Widget` type - }).expect("Drop area highlight widget was defined twice"); - - // - Adds the widget on drag enter - self.drop_target.connect_enter( - clone!(@weak obj => @default-return gdk::DragAction::COPY, move |_drop_target, _x, _y| { - obj.toggle_drop_area_highlight(true); - gdk::DragAction::COPY - }) + //only accept drops from out side the app + //https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/244#note_1788260 + self.drop_target.connect_accept( + clone!(@weak obj => @default-return false, move |_drop_target, drop| { + //drag is between Loupe windows + if let Some(drop) = drop.drag() { + let file = drop + .content() + .value(gdk::FileList::static_type()) + .ok() + .and_then(|value| value.get::().ok()) + .and_then(|files| files.files().first().and_then(|file| file.path())); + let current_image = obj.image_view().current_file().and_then(|file| file.path()); + return file.ne(¤t_image); + } + //drag from another window, should always be accepted + true + }), ); - // - Removes the widget on drag leave - self.drop_target.connect_leave(clone!(@weak obj => move |_drop_target| { - obj.toggle_drop_area_highlight(false); - })); - // For callbacks, you will want to reference the GTK docs on // the relevant signal to see which parameters you need. // In this case, we need only need the GValue, // so we name it `value` then use `_` for the other spots. self.drop_target.connect_drop( clone!(@weak obj => @default-return false, move |_, value, _, _| { - // - Removes the widget on drag completion - obj.toggle_drop_area_highlight(false); // Here we use a GValue, which is a dynamic object that can hold different types, // e.g. strings, numbers, or in this case objects. In order to get the GdkFileList @@ -441,6 +432,7 @@ mod imp { true }), ); + self.drag_overlay.set_drop_target(&*self.drop_target); } } @@ -949,36 +941,6 @@ impl LpWindow { && (!self.is_headerbar_flat() || !self.imp().headerbar_events.contains_pointer()) } - /// Displays visual feedback for users trying to drag and drop - fn toggle_drop_area_highlight(&self, display: bool) { - let overlay = &self.imp().drop_area_overlay; - let widget = self.imp().drop_area_highlight_widget.get() - .expect("`drop_area_highlight_widget` needs to be defined before being toggled"); - - // Create fade in animation. Will be reversed to make a fade-out. - let animation = adw::TimedAnimation::new( - widget, 0.0, 1.0, 250, adw::PropertyAnimationTarget::new(widget, "opacity") - ); - - if display && widget.parent().is_none() { - // Overlay widget - overlay.add_overlay(widget); - // Hide controls to avoid messy superpositions - self.hide_controls() - } else if !display && widget.parent().is_some() { - // Reverse the fade-in animation - animation.set_reverse(true); - // Remove overlay after animation end - animation.connect_done(|animation| { - let widget = animation.widget(); - let overlay = widget.parent().and_downcast::().unwrap(); - overlay.remove_overlay(&widget); - }); - }; - - animation.play(); - } - #[template_callback] fn on_fullscreened(&self) { if !self.is_fullscreened() { -- GitLab From cf8fa499d977780fb05c23e3004d7cbb01141fd5 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Sat, 15 Jul 2023 20:21:00 +0200 Subject: [PATCH 3/5] window: New way to detect own window in d+d This is a (hopefully) cleaner way to detect if we are dragging out of the own window to not show drag indicator in that case. Part-of: --- src/widgets/image_view.rs | 15 ++++++++++----- src/window.rs | 17 ++--------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index c96b87b2..9557a371 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -78,6 +78,8 @@ mod imp { #[template_child] pub sliding_view: TemplateChild, + pub drag_source: gtk::DragSource, + pub(super) model: RefCell, pub(super) preserve_content: Cell, @@ -164,10 +166,9 @@ mod imp { self.current_image_signals.set(signal_group).unwrap(); - let source = gtk::DragSource::new(); - source.set_exclusive(true); + self.drag_source.set_exclusive(true); - source.connect_prepare( + self.drag_source.connect_prepare( glib::clone!(@weak obj => @default-return None, move |gesture, _, _| { let is_scrollable = obj .current_page() @@ -184,7 +185,7 @@ mod imp { }), ); - source.connect_drag_begin(glib::clone!(@weak obj => move |source, _| { + self.drag_source.connect_drag_begin(glib::clone!(@weak obj => move |source, _| { if let Some(paintable) = obj.current_image().and_then(|p| p.thumbnail()) { // -6 for cursor width, +16 for margin in .drag-icon source.set_icon(Some(&paintable), paintable.intrinsic_width() / 2 - 6 + 16, -12); @@ -198,7 +199,7 @@ mod imp { }; })); - obj.add_controller(source); + obj.add_controller(self.drag_source.clone()); } } @@ -545,6 +546,10 @@ impl LpImageView { .and_then(|x| x.image().file()) } + pub fn drag_source(&self) -> gtk::DragSource { + self.imp().drag_source.clone() + } + /// Returns `true` if there is an image before the current one pub fn is_previous_available(&self) -> bool { if let Some(file) = self.current_file() { diff --git a/src/window.rs b/src/window.rs index 828a7048..34442208 100644 --- a/src/window.rs +++ b/src/window.rs @@ -377,23 +377,10 @@ mod imp { self.drop_target.set_types(&[gdk::FileList::static_type()]); - //only accept drops from out side the app - //https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/244#note_1788260 + // Only accept drops from external sources or different windows self.drop_target.connect_accept( clone!(@weak obj => @default-return false, move |_drop_target, drop| { - //drag is between Loupe windows - if let Some(drop) = drop.drag() { - let file = drop - .content() - .value(gdk::FileList::static_type()) - .ok() - .and_then(|value| value.get::().ok()) - .and_then(|files| files.files().first().and_then(|file| file.path())); - let current_image = obj.image_view().current_file().and_then(|file| file.path()); - return file.ne(¤t_image); - } - //drag from another window, should always be accepted - true + drop.drag().is_none() || drop.drag() != obj.image_view().drag_source().drag() }), ); -- GitLab From 08a9c3e450cf092d43ea3e254e3627427a4ec45f Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Sat, 15 Jul 2023 20:43:01 +0200 Subject: [PATCH 4/5] window: Remove default drop target style The default does not fit well with our new custom one. This also removes a bunch of code which was not used. Part-of: --- data/gtk/window.ui | 8 ++++---- data/resources/style.css | 8 ++++++-- src/widgets/drag_overlay.rs | 38 +++++++++++++++---------------------- src/window.rs | 1 - 4 files changed, 25 insertions(+), 30 deletions(-) diff --git a/data/gtk/window.ui b/data/gtk/window.ui index 51db83d5..b987339c 100644 --- a/data/gtk/window.ui +++ b/data/gtk/window.ui @@ -169,12 +169,9 @@ + drop_target - 24 - 24 - 24 - 24 false copy diff --git a/data/resources/style.css b/data/resources/style.css index 4a339da9..7833aa62 100644 --- a/data/resources/style.css +++ b/data/resources/style.css @@ -31,17 +31,21 @@ row.property label.subtitle { box-shadow: 0 0 10px rgba(0, 0, 0, 200); } -.custom-drag-n-drop-highlight { +/* Remove default adwaita style */ +.drop-widget:drop(active):focus, +.drop-widget:drop(active) { box-shadow: none; } +/* Drag overlay */ .lp-dragging-area-highlight { border-radius: 8px; background-color: alpha(@blue_2, 0.35); + margin: 24px; } lpprintpreview { background-color: rgb(240, 240, 240); border-radius: 4px; box-shadow: 0 0 14px 1px black; -} \ No newline at end of file +} diff --git a/src/widgets/drag_overlay.rs b/src/widgets/drag_overlay.rs index cd622f8a..1d419092 100644 --- a/src/widgets/drag_overlay.rs +++ b/src/widgets/drag_overlay.rs @@ -16,10 +16,11 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use gtk::{glib, prelude::*}; +use crate::deps::*; +use adw::prelude::*; mod imp { - use std::cell::RefCell; + use once_cell::sync::OnceCell; use adw::subclass::prelude::*; use glib::{ParamSpec, Properties, Value}; @@ -37,9 +38,8 @@ mod imp { pub overlayed: Option, pub overlay: gtk::Overlay, pub revealer: gtk::Revealer, - #[property(set = Self::set_drop_target, get, explicit_notify)] - pub drop_target: RefCell>, - pub handler_id: RefCell>, + #[property(set = Self::set_drop_target, get, explicit_notify, construct_only)] + pub drop_target: OnceCell, } #[glib::object_subclass] @@ -47,6 +47,10 @@ mod imp { const NAME: &'static str = "LpDragOverlay"; type Type = super::LpDragOverlay; type ParentType = adw::Bin; + + fn class_init(klass: &mut Self::Class) { + klass.set_css_name("lpdragoverlay"); + } } impl ObjectImpl for LpDragOverlay { @@ -88,29 +92,17 @@ mod imp { self.revealer.set_child(overlayed.as_ref()); } - pub fn set_drop_target(&self, drop_target: >k::DropTarget) { - if let Some(target) = self.drop_target.borrow_mut().take() { - self.obj().remove_controller(&target); - - if let Some(handler_id) = self.handler_id.borrow_mut().take() { - target.disconnect(handler_id); - } - } - - let handler_id = drop_target.connect_current_drop_notify( + pub fn set_drop_target(&self, drop_target: gtk::DropTarget) { + drop_target.connect_current_drop_notify( glib::clone!(@weak self.revealer as revealer => move |target| { let reveal = target.current_drop().is_some(); revealer.set_reveal_child(reveal); }), ); - self.handler_id.replace(Some(handler_id)); - - // avoid `gtk_event_controller_get_widget (controller) == NULL` failing - if drop_target.widget().is_visible() { - self.obj().add_controller(drop_target.clone()); - self.drop_target.replace(Some(drop_target.clone())); - self.obj().notify("drop-target"); - } + + self.drop_target.set(drop_target).unwrap(); + + self.obj().notify("drop-target"); } } } diff --git a/src/window.rs b/src/window.rs index 34442208..5e8cee29 100644 --- a/src/window.rs +++ b/src/window.rs @@ -419,7 +419,6 @@ mod imp { true }), ); - self.drag_overlay.set_drop_target(&*self.drop_target); } } -- GitLab From 55551ae6a26212697654adaf1a9da386b5012382 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Sun, 16 Jul 2023 22:47:10 +0200 Subject: [PATCH 5/5] general: Update copyright notices Part-of: --- src/about.rs | 1 + src/decoder/tiling.rs | 1 + src/file_model.rs | 2 +- src/image_metadata/gps.rs | 1 + src/image_metadata/mod.rs | 1 + src/widgets/drag_overlay.rs | 6 +++++- src/widgets/image.rs | 2 +- src/widgets/image_page.rs | 1 - src/widgets/image_view.rs | 2 +- src/widgets/mod.rs | 1 + src/widgets/sliding_view.rs | 2 +- src/window.rs | 4 +++- 12 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/about.rs b/src/about.rs index 61f39d80..f35ef489 100644 --- a/src/about.rs +++ b/src/about.rs @@ -1,3 +1,4 @@ +// Copyright (c) 2023 Christopher Davis // Copyright (c) 2023 Sophie Herold // // This program is free software: you can redistribute it and/or modify diff --git a/src/decoder/tiling.rs b/src/decoder/tiling.rs index 330888c9..1d263c06 100644 --- a/src/decoder/tiling.rs +++ b/src/decoder/tiling.rs @@ -1,4 +1,5 @@ // Copyright (c) 2023 Sophie Herold +// Copyright (c) 2023 FineFindus // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/file_model.rs b/src/file_model.rs index ab444c8e..1f3ec83a 100644 --- a/src/file_model.rs +++ b/src/file_model.rs @@ -1,5 +1,5 @@ // Copyright (c) 2022-2023 Sophie Herold -// Copyright (c) 2022 Christopher Davis +// Copyright (c) 2022-2023 Christopher Davis // Copyright (c) 2023 Gage Berz // // This program is free software: you can redistribute it and/or modify diff --git a/src/image_metadata/gps.rs b/src/image_metadata/gps.rs index c0e95ec6..f93b826f 100644 --- a/src/image_metadata/gps.rs +++ b/src/image_metadata/gps.rs @@ -1,4 +1,5 @@ // Copyright (c) 2022-2023 Sophie Herold +// Copyright (c) 2023 FineFindus // Copyright (c) 2023 Lubosz Sarnecki // // This program is free software: you can redistribute it and/or modify diff --git a/src/image_metadata/mod.rs b/src/image_metadata/mod.rs index d2597896..a96076ed 100644 --- a/src/image_metadata/mod.rs +++ b/src/image_metadata/mod.rs @@ -1,4 +1,5 @@ // Copyright (c) 2022-2023 Sophie Herold +// Copyright (c) 2023 FineFindus // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/widgets/drag_overlay.rs b/src/widgets/drag_overlay.rs index 1d419092..e8df24c5 100644 --- a/src/widgets/drag_overlay.rs +++ b/src/widgets/drag_overlay.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Maximiliano Sandoval R +// Copyright (c) 2023 Sophie Herold // Copyright (c) 2023 FineFindus // // This program is free software: you can redistribute it and/or modify @@ -16,6 +16,10 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +//! A widget that shows an overlay when dragging an image over the window +//! +//! This implementation is inspired by [Amberol](https://gitlab.gnome.org/World/amberol) + use crate::deps::*; use adw::prelude::*; diff --git a/src/widgets/image.rs b/src/widgets/image.rs index 29f3e127..f95cdddc 100644 --- a/src/widgets/image.rs +++ b/src/widgets/image.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022 Christopher Davis +// Copyright (c) 2021-2023 Christopher Davis // Copyright (c) 2022-2023 Sophie Herold // Copyright (c) 2022 Maximiliano Sandoval R // Copyright (c) 2023 Lubosz Sarnecki diff --git a/src/widgets/image_page.rs b/src/widgets/image_page.rs index 59abaea8..a52f041c 100644 --- a/src/widgets/image_page.rs +++ b/src/widgets/image_page.rs @@ -1,6 +1,5 @@ // Copyright (c) 2022-2023 Sophie Herold // Copyright (c) 2022 Christopher Davis -// Copyright (c) 2023 Huan Nguyen // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index 9557a371..4d004782 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -2,8 +2,8 @@ // Copyright (c) 2022-2023 Sophie Herold // Copyright (c) 2022 Elton A Rodrigues // Copyright (c) 2022 Maximiliano Sandoval R -// Copyright (c) 2023 Huan Nguyen // Copyright (c) 2023 FineFindus +// Copyright (c) 2023 Huan Nguyen // Copyright (c) 2023 Philipp Kiemle // // This program is free software: you can redistribute it and/or modify diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 09087860..2b937120 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -1,4 +1,5 @@ // Copyright (c) 2020-2022 Christopher Davis +// Copyright (c) 2023 FineFindus // Copyright (c) 2023 Sophie Herold // // This program is free software: you can redistribute it and/or modify diff --git a/src/widgets/sliding_view.rs b/src/widgets/sliding_view.rs index 0ac7c866..e7649eba 100644 --- a/src/widgets/sliding_view.rs +++ b/src/widgets/sliding_view.rs @@ -1,5 +1,5 @@ -// Copyright (c) 2023 Sophie Herold // Copyright (c) 2023 Christopher Davis +// Copyright (c) 2023 Sophie Herold // Copyright (c) 2023 Lubosz Sarnecki // // This program is free software: you can redistribute it and/or modify diff --git a/src/window.rs b/src/window.rs index 5e8cee29..01062605 100644 --- a/src/window.rs +++ b/src/window.rs @@ -2,7 +2,9 @@ // Copyright (c) 2022-2023 Sophie Herold // Copyright (c) 2022 Elton A Rodrigues // Copyright (c) 2022 Maximiliano Sandoval R -// Copyright (c) 2023 Huan Nguyen +// Copyright (c) 2023 FineFindus +// Copyright (c) 2023 qwel +// Copyright (c) 2023 Huan Thieu Nguyen // Copyright (c) 2023 Sabri Ünal // Copyright (c) 2023 Lubosz Sarnecki // -- GitLab