-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
80 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ pub mod all_photos; | |
pub mod month_photos; | ||
pub mod year_photos; | ||
pub mod one_photo; | ||
pub mod photo_info; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// SPDX-FileCopyrightText: © 2024 David Bliss | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
use photos_core::Scanner; | ||
use gtk::prelude::OrientableExt; | ||
use relm4::gtk; | ||
use relm4::*; | ||
use relm4::adw::prelude::PreferencesRowExt; | ||
|
||
|
||
#[derive(Debug)] | ||
pub struct PhotoInfo { | ||
scanner: Scanner, | ||
} | ||
|
||
|
||
#[relm4::component(pub)] | ||
impl SimpleComponent for PhotoInfo { | ||
type Init = Scanner; | ||
type Input = (); | ||
type Output = (); | ||
|
||
view! { | ||
gtk::Box { | ||
set_orientation: gtk::Orientation::Vertical, | ||
|
||
gtk::ListBox { | ||
adw::ActionRow { | ||
set_title: "Test Title", | ||
} | ||
} | ||
} | ||
} | ||
|
||
fn init( | ||
scanner: Self::Init, | ||
_root: Self::Root, | ||
_sender: ComponentSender<Self>, | ||
) -> ComponentParts<Self> { | ||
|
||
let widgets = view_output!(); | ||
|
||
let model = PhotoInfo { | ||
scanner, | ||
}; | ||
|
||
ComponentParts { model, widgets } | ||
} | ||
|
||
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {} | ||
} | ||
|