summaryrefslogtreecommitdiffstats
path: root/examples/screenshot
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-27 19:41:03 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-27 19:41:03 +0200
commit5ae726e02c4d6c9889ef7335d9bc80ef1992e34f (patch)
treee1f3c2b81eee55d9a1426e847dfbb25d523d7885 /examples/screenshot
parent93673836cd2932351b25dea6ca46ae50d0e35ace (diff)
downloadiced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.tar.gz
iced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.tar.bz2
iced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.zip
Move `Screenshot` inside `window` module
Diffstat (limited to 'examples/screenshot')
-rw-r--r--examples/screenshot/src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs
index ef2be4fe..83824535 100644
--- a/examples/screenshot/src/main.rs
+++ b/examples/screenshot/src/main.rs
@@ -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>,