[simple-scan] Change the Scan/Stop button immedietely after clicking to improve User Experience, and allow for ear



commit eb1cf2142a1312ed35d7054487522a5a0df6a9ca
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Sat Nov 30 23:40:06 2019 +0100

    Change the Scan/Stop button immedietely after clicking to improve User Experience, and allow for early 
stop of scanning

 src/app-window.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 12caf9a..a416db9 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -758,6 +758,8 @@ public class AppWindow : Gtk.ApplicationWindow
     [GtkCallback]
     private void scan_button_clicked_cb (Gtk.Widget widget)
     {
+        scan_button.visible = false;
+        stop_button.visible = true;
         var options = make_scan_options ();
         options.type = scan_type;
         if (options.type == ScanType.ADF_BOTH)
@@ -768,6 +770,8 @@ public class AppWindow : Gtk.ApplicationWindow
     [GtkCallback]
     private void stop_scan_button_clicked_cb (Gtk.Widget widget)
     {
+        scan_button.visible = true;
+        stop_button.visible = false;
         stop_scan ();
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]