[gnumeric] horizontal distributed: fix rendering a bit and add icon.



commit 7497fb46a46a91853725d880756f24a87adca5cb
Author: Morten Welinder <terra gnome org>
Date:   Tue Dec 30 21:12:03 2014 -0500

    horizontal distributed: fix rendering a bit and add icon.

 ChangeLog                                          |    5 +++++
 NEWS                                               |    1 +
 icons/32x32/actions/Makefile.am                    |    1 +
 .../actions/gnumeric-format-halign-distributed.png |  Bin 0 -> 826 bytes
 src/gnm.gresource.xml                              |    1 +
 src/rendered-value.c                               |    4 ++++
 src/wbc-gtk-actions.c                              |    1 +
 7 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 356101f..aa654c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-30  Morten Welinder  <terra gnome org>
+
+       * src/rendered-value.c (gnm_rendered_value_new):
+       GNM_HALIGN_DISTRIBUTED is justify+center.  Fixes #726155.
+
 2014-12-27  Morten Welinder  <terra gnome org>
 
        * src/colrow.c (colrow_set_visibility): Don't create columns/rows
diff --git a/NEWS b/NEWS
index ac36d32..491d180 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Morten:
        * Improve test suite.
        * Reorganize icon handling.
        * Allow removing a specific item from the history.  [#735305]
+       * Fix GNM_HALIGN_DISTRIBUTED rendering.  [#726155]
 
 Thomas Kluyver:
        * Fix import of extended floats from wk4 files.  [#739697]
diff --git a/icons/32x32/actions/Makefile.am b/icons/32x32/actions/Makefile.am
index 95e763b..29861a5 100644
--- a/icons/32x32/actions/Makefile.am
+++ b/icons/32x32/actions/Makefile.am
@@ -1,4 +1,5 @@
 internalicons = \
+       gnumeric-format-halign-distributed.png \
        gnumeric-format-valign-bottom.png \
        gnumeric-format-valign-center.png \
        gnumeric-format-valign-distributed.png \
diff --git a/icons/32x32/actions/gnumeric-format-halign-distributed.png 
b/icons/32x32/actions/gnumeric-format-halign-distributed.png
new file mode 100644
index 0000000..3d0c86e
Binary files /dev/null and b/icons/32x32/actions/gnumeric-format-halign-distributed.png differ
diff --git a/src/gnm.gresource.xml b/src/gnm.gresource.xml
index bf81213..4b8ba26 100644
--- a/src/gnm.gresource.xml
+++ b/src/gnm.gresource.xml
@@ -155,6 +155,7 @@
     <file>icons/24x24/actions/gnumeric-superscript.png</file>
     <file>icons/24x24/actions/gnumeric-ungroup.xpm</file>
     <file>icons/32x32/actions/cursor-cross.xpm</file>
+    <file>icons/32x32/actions/gnumeric-format-halign-distributed.png</file>
     <file>icons/32x32/actions/gnumeric-format-valign-bottom.png</file>
     <file>icons/32x32/actions/gnumeric-format-valign-center.png</file>
     <file>icons/32x32/actions/gnumeric-format-valign-distributed.png</file>
diff --git a/src/rendered-value.c b/src/rendered-value.c
index 427d415..5e0ecc4 100644
--- a/src/rendered-value.c
+++ b/src/rendered-value.c
@@ -535,6 +535,10 @@ gnm_rendered_value_new (GnmCell const *cell,
                break;
 
        case GNM_HALIGN_DISTRIBUTED:
+               pango_layout_set_justify (layout, TRUE);
+               pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+               break;
+
        case GNM_HALIGN_CENTER:
        case GNM_HALIGN_CENTER_ACROSS_SELECTION:
                pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index b6ce926..9e99707 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -2915,6 +2915,7 @@ static GOActionComboPixmapsElement const halignment_combo_info[] = {
        { N_("Align right"),            "format-justify-right",         GNM_HALIGN_RIGHT },
        { N_("Fill horizontally"),      "gnumeric-format-halign-fill",  GNM_HALIGN_FILL },
        { N_("Justify horizontally"),   "format-justify-fill",          GNM_HALIGN_JUSTIFY },
+       { N_("Distributed"),            "gnumeric-format-halign-distributed",   GNM_HALIGN_DISTRIBUTED },
        { N_("Center horizontally across the selection"),
                                        "gnumeric-center-across-selection", 
GNM_HALIGN_CENTER_ACROSS_SELECTION },
        { N_("Align numbers right, and text left"),


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