aboutsummaryrefslogtreecommitdiff
path: root/src/dialogs.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-03-23 20:52:55 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-03-26 18:07:20 +0100
commit8ce55652306908bf24ee351caad60bd21b0bef72 (patch)
treec4710c2be73bcfc5afb172dd76284735ee6924f0 /src/dialogs.rs
parent34a4ddeb3ad4c2b4e317648f58db5a460f4a14bb (diff)
Use breakpoints to disable horizontal layout at smaller sizes
Diffstat (limited to 'src/dialogs.rs')
-rw-r--r--src/dialogs.rs12
1 files changed, 6 insertions, 6 deletions
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: &gtk::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: &gtk::Window, title: &str, message: &str) {
/// Shows a file open dialog and handles the response.
pub fn show_open_dialog(
- window: &gtk::Window,
+ window: &adw::Window,
is_empty_document: bool,
sender: ComponentSender<AppModel>,
) {
@@ -86,7 +86,7 @@ pub fn show_open_dialog(
/// Shows a file save dialog and handles the response.
pub fn show_save_dialog(
- window: &gtk::Window,
+ window: &adw::Window,
current_file: Option<&PathBuf>,
close_after: bool,
sender: ComponentSender<AppModel>,
@@ -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: &gtk::Window,
+ window: &adw::Window,
current_file: Option<PathBuf>,
sender: ComponentSender<AppModel>,
) {
@@ -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: &gtk::Window,
+ window: &adw::Window,
current_file: Option<&PathBuf>,
sender: ComponentSender<AppModel>,
) {