[gimp] app: reduce dialog size of Unified Transform tool and friends



commit ac74326ec7af618a52bfcc684c782ec4f6866d6b
Author: Ell <ell_se yahoo com>
Date:   Mon Jan 6 12:12:57 2020 +0200

    app: reduce dialog size of Unified Transform tool and friends
    
    The tool dialog of generic-transform tools (the Unified,
    Perspective, and Handle Trasnform tools) shows the current
    transformation matrix.  Although we might as well show *something*
    in the dialog (we can't get rid of it altogether, as it provides
    the common tool actions), this information is probably meaningless
    for most users, and isn't directly editable anyway.
    
    Reduce the size of the matrix, to make it less prominent, and free
    up some space.

 app/tools/gimpgenerictransformtool.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpgenerictransformtool.c b/app/tools/gimpgenerictransformtool.c
index 671d2ed8fe..f43417ee69 100644
--- a/app/tools/gimpgenerictransformtool.c
+++ b/app/tools/gimpgenerictransformtool.c
@@ -122,7 +122,10 @@ gimp_generic_transform_tool_dialog (GimpTransformGridTool *tg_tool)
         {
           label = generic->matrix_labels[y][x] = gtk_label_new (" ");
           gtk_label_set_xalign (GTK_LABEL (label), 1.0);
-          gtk_label_set_width_chars (GTK_LABEL (label), 12);
+          gtk_label_set_width_chars (GTK_LABEL (label), 8);
+          gimp_label_set_attributes (GTK_LABEL (label),
+                                     PANGO_ATTR_SCALE, PANGO_SCALE_SMALL,
+                                     -1);
           gtk_grid_attach (GTK_GRID (grid), label, x, y, 1, 1);
           gtk_widget_show (label);
         }
@@ -161,7 +164,7 @@ gimp_generic_transform_tool_dialog_update (GimpTransformGridTool *tg_tool)
             {
               gchar buf[32];
 
-              g_snprintf (buf, sizeof (buf), "%10.5f", transform.coeff[y][x]);
+              g_snprintf (buf, sizeof (buf), "%.4f", transform.coeff[y][x]);
 
               gtk_label_set_text (GTK_LABEL (generic->matrix_labels[y][x]), buf);
             }


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