imageView: Hide controls after mouse inactivity
Closes #25 Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/189>
This commit is contained in:
parent
7b6ee24651
commit
916514604c
4 changed files with 180 additions and 10 deletions
|
|
@ -65,9 +65,14 @@ mod imp {
|
|||
/// overlayed controls
|
||||
#[template_child]
|
||||
pub(super) controls_box_start: TemplateChild<gtk::Widget>,
|
||||
#[template_child]
|
||||
pub(super) controls_box_start_events: TemplateChild<gtk::EventControllerMotion>,
|
||||
/// overlayed controls
|
||||
#[template_child]
|
||||
pub(super) controls_box_end: TemplateChild<gtk::Widget>,
|
||||
#[template_child]
|
||||
pub(super) controls_box_end_events: TemplateChild<gtk::EventControllerMotion>,
|
||||
|
||||
#[template_child]
|
||||
pub sliding_view: TemplateChild<LpSlidingView>,
|
||||
|
||||
|
|
@ -413,6 +418,22 @@ impl LpImageView {
|
|||
self.imp().sliding_view.clone()
|
||||
}
|
||||
|
||||
pub fn controls_box_start(&self) -> gtk::Widget {
|
||||
self.imp().controls_box_start.clone()
|
||||
}
|
||||
|
||||
pub fn controls_box_start_events(&self) -> gtk::EventControllerMotion {
|
||||
self.imp().controls_box_start_events.clone()
|
||||
}
|
||||
|
||||
pub fn controls_box_end(&self) -> gtk::Widget {
|
||||
self.imp().controls_box_end.clone()
|
||||
}
|
||||
|
||||
pub fn controls_box_end_events(&self) -> gtk::EventControllerMotion {
|
||||
self.imp().controls_box_end_events.clone()
|
||||
}
|
||||
|
||||
fn model(&self) -> LpFileModel {
|
||||
self.imp().model.borrow().clone()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue