Changeset - 9d927a271fbb
[Not reviewed]
default
0 1 0
Jason Maltzen (jmaltzen) - 6 years ago 2018-05-17 19:11:12
jason.maltzen@unsanctioned.net
Turn off record button when captured color is clipped.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
UI/CaptureView.cs
Show inline comments
...
 
@@ -390,40 +390,43 @@ namespace DesertPaintLab
 
                {
 
                    warning = warning + "\nRed is too high.";
 
                }
 
                if (reactedColor.Green == 255)
 
                {
 
                    warning = warning + "\nGreen is too high.";
 
                }
 
                if (reactedColor.Blue == 255)
 
                {
 
                    warning = warning + "\nBlue is too high.";
 
                }
 

	
 
                // Always update the reacted swatch
 
                this.reactionSwatch.Color = reactedColor;
 
                if (warning.Length != 0)
 
                {
 
                    isCaptured = true;
 
                    Gtk.MessageDialog md = new Gtk.MessageDialog((Gtk.Window)Toplevel,
 
                    Gtk.DialogFlags.DestroyWithParent,
 
                    Gtk.MessageType.Error, Gtk.ButtonsType.Ok,
 
                    "Reaction clipped.  You will need to do a " +
 
                    "3-way reaction to test this pair.  Details: " +
 
                    warning);
 

	
 
                    md.Run();
 
                    md.Destroy();
 
                    // reaction clipped - don't let them record
 
                    recordButton.Sensitive = false;
 
                }
 
                else
 
                {
 
                    this.reactionSwatch.Color = reactedColor;
 
                    recordButton.Sensitive = recordEnabled;
 
                }
 

	
 
                captureButton.Sensitive = false;
 
            }
 
            else
 
            {
 
                Gtk.MessageDialog md = new Gtk.MessageDialog((Gtk.Window)Toplevel,
 
                    Gtk.DialogFlags.DestroyWithParent,
 
                    Gtk.MessageType.Error, Gtk.ButtonsType.Ok,
 
                    "Pigment Lab dialog box NOT FOUND.  Please ensure " +
 
                    "that there is an unobstructed view of the dialog " +
0 comments (0 inline, 0 general)