Move Screenshot inside window module

This commit is contained in:
Héctor Ramón Jiménez 2023-06-27 19:41:03 +02:00
parent 93673836cd
commit 5ae726e02c
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 13 additions and 10 deletions

View file

@ -1,16 +1,17 @@
use ::image as img;
use ::image::ColorType;
use iced::alignment;
use iced::keyboard::KeyCode;
use iced::theme::{Button, Container};
use iced::widget::runtime::{CropError, Screenshot};
use iced::widget::{button, column, container, image, row, text, text_input};
use iced::window::screenshot::{self, Screenshot};
use iced::{
event, executor, keyboard, subscription, Alignment, Application, Command,
ContentFit, Element, Event, Length, Rectangle, Renderer, Subscription,
Theme,
};
use ::image as img;
use ::image::ColorType;
fn main() -> iced::Result {
env_logger::builder().format_timestamp(None).init();
@ -21,7 +22,7 @@ struct Example {
screenshot: Option<Screenshot>,
saved_png_path: Option<Result<String, PngError>>,
png_saving: bool,
crop_error: Option<CropError>,
crop_error: Option<screenshot::CropError>,
x_input_value: Option<u32>,
y_input_value: Option<u32>,
width_input_value: Option<u32>,