Tweak colour matrix precision display.
authorCarl Hetherington <cth@carlh.net>
Sun, 18 Aug 2013 20:18:12 +0000 (21:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 18 Aug 2013 20:18:12 +0000 (21:18 +0100)
src/wx/colour_conversion_editor.cc

index 091028dcd1fe9a0693a531aef84c2ac7b7dfb2b3..823f5ad385aa07b08864f7a409ca471b653def30 100644 (file)
@@ -51,7 +51,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
        ++r;
 
         wxClientDC dc (parent);
-        wxSize size = dc.GetTextExtent (wxT ("-0.123456789012345678"));
+        wxSize size = dc.GetTextExtent (wxT ("-0.12345678901"));
         size.SetHeight (-1);
 
         wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST);
@@ -112,7 +112,7 @@ ColourConversionEditor::set (ColourConversion conversion)
                for (int j = 0; j < 3; ++j) {
                        stringstream s;
                        s.setf (std::ios::fixed, std::ios::floatfield);
-                       s.precision (14);
+                       s.precision (7);
                        s << conversion.matrix (i, j);
                        _matrix[i][j]->SetValue (std_to_wx (s.str ()));
                }