From 8ce55652306908bf24ee351caad60bd21b0bef72 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 23 Mar 2026 20:52:55 +0100 Subject: Use breakpoints to disable horizontal layout at smaller sizes --- src/dialogs.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/dialogs.rs') diff --git a/src/dialogs.rs b/src/dialogs.rs index 242f3d6..22b12df 100644 --- a/src/dialogs.rs +++ b/src/dialogs.rs @@ -20,7 +20,7 @@ use std::path::PathBuf; use gtk::prelude::*; use relm4::gtk::gio; -use relm4::{ComponentSender, gtk}; +use relm4::{ComponentSender, adw, gtk}; use crate::AppModel; use crate::actions::{Action, ImageFormat}; @@ -38,7 +38,7 @@ pub fn create_file_filter() -> gtk::FileFilter { } /// Shows an error dialog with the given title and message. -pub fn show_error(window: >k::Window, title: &str, message: &str) { +pub fn show_error(window: &adw::Window, title: &str, message: &str) { let dialog = gtk::AlertDialog::builder() .modal(true) .buttons([&tr!("dialog.action.cancel"), "Ok"]) @@ -50,7 +50,7 @@ pub fn show_error(window: >k::Window, title: &str, message: &str) { /// Shows a file open dialog and handles the response. pub fn show_open_dialog( - window: >k::Window, + window: &adw::Window, is_empty_document: bool, sender: ComponentSender, ) { @@ -86,7 +86,7 @@ pub fn show_open_dialog( /// Shows a file save dialog and handles the response. pub fn show_save_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option<&PathBuf>, close_after: bool, sender: ComponentSender, @@ -127,7 +127,7 @@ pub fn show_save_dialog( /// Shows a dialog asking whether to save unsaved changes before closing. pub fn show_unsaved_changes_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option, sender: ComponentSender, ) { @@ -184,7 +184,7 @@ fn create_image_filter(format: ImageFormat) -> gtk::FileFilter { /// Shows an export image dialog and handles the response. pub fn show_export_dialog( - window: >k::Window, + window: &adw::Window, current_file: Option<&PathBuf>, sender: ComponentSender, ) { -- cgit