[Libreoffice-commits] core.git: include/vcl starmath/inc starmath/source starmath/uiconfig vcl/source vcl/unx

Caolán McNamara caolanm at redhat.com
Tue Apr 10 19:35:31 UTC 2018


 include/vcl/weld.hxx                        |   27 
 starmath/inc/dialog.hxx                     |   51 -
 starmath/source/dialog.cxx                  |  220 ++---
 starmath/source/document.cxx                |    8 
 starmath/uiconfig/smath/ui/spacingdialog.ui | 1122 +++++++++++++---------------
 vcl/source/app/salvtables.cxx               |   43 +
 vcl/unx/gtk3/gtk3gtkinst.cxx                |  134 ++-
 7 files changed, 813 insertions(+), 792 deletions(-)

New commits:
commit aece54a415e5e35d6c5f5cfd1f6d8b3af594d272
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 9 16:21:28 2018 +0100

    weld SpacingDialog
    
    Change-Id: Ida9077b19ad78001c632796257651e4314a9a538
    Reviewed-on: https://gerrit.libreoffice.org/52676
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index ebbd505736d4..c3cf00270360 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -308,6 +308,19 @@ public:
     void connect_clicked(const Link<Button&, void>& rLink) { m_aClickHdl = rLink; }
 };
 
+class VCL_DLLPUBLIC MenuButton : virtual public Button
+{
+protected:
+    Link<const OString&, void> m_aSelectHdl;
+
+    void signal_selected(const OString& rIdent) { m_aSelectHdl.Call(rIdent); }
+
+public:
+    void connect_selected(const Link<const OString&, void>& rLink) { m_aSelectHdl = rLink; }
+
+    virtual void set_active(const OString& rIdent, bool bActive) = 0;
+};
+
 class VCL_DLLPUBLIC ToggleButton : virtual public Button
 {
 protected:
@@ -549,7 +562,7 @@ public:
     bool get_visible() const { return m_xSpinButton->get_visible(); }
     void grab_focus() { m_xSpinButton->grab_focus(); }
     bool has_focus() const { return m_xSpinButton->has_focus(); }
-    void show() { m_xSpinButton->show(); }
+    void show(bool bShow = true) { m_xSpinButton->show(bShow); }
     void hide() { m_xSpinButton->hide(); }
     void set_digits(unsigned int digits) { m_xSpinButton->set_digits(digits); }
     unsigned int get_digits() const { return m_xSpinButton->get_digits(); }
@@ -565,6 +578,16 @@ public:
         m_xSpinButton->set_size_request(nWidth, nHeight);
     }
     Size get_preferred_size() const { return m_xSpinButton->get_preferred_size(); }
+    void connect_focus_in(const Link<Widget&, void>& rLink)
+    {
+        m_xSpinButton->connect_focus_in(rLink);
+    }
+    void connect_focus_out(const Link<Widget&, void>& rLink)
+    {
+        m_xSpinButton->connect_focus_out(rLink);
+    }
+    void set_help_id(const OString& rName) { m_xSpinButton->set_help_id(rName); }
+    const weld::SpinButton* get_widget() const { return m_xSpinButton.get(); }
 };
 
 class VCL_DLLPUBLIC Label : virtual public Widget
@@ -639,6 +662,7 @@ class VCL_DLLPUBLIC Menu
 public:
     virtual OString popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect) = 0;
     virtual void set_sensitive(const OString& rIdent, bool bSensitive) = 0;
+    virtual void set_active(const OString& rIdent, bool bActive) = 0;
     virtual void show(const OString& rIdent, bool bShow) = 0;
     virtual ~Menu() {}
 };
@@ -663,6 +687,7 @@ public:
     virtual Widget* weld_widget(const OString& id, bool bTakeOwnership = false) = 0;
     virtual Container* weld_container(const OString& id, bool bTakeOwnership = false) = 0;
     virtual Button* weld_button(const OString& id, bool bTakeOwnership = false) = 0;
+    virtual MenuButton* weld_menu_button(const OString& id, bool bTakeOwnership = false) = 0;
     virtual Frame* weld_frame(const OString& id, bool bTakeOwnership = false) = 0;
     virtual ScrolledWindow* weld_scrolled_window(const OString& id, bool bTakeOwnership = false)
         = 0;
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index bc0701421d43..cd860e5649b1 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -179,13 +179,13 @@ class SmCategoryDesc
 {
     OUString Name;
     OUString Strings[4];
-    std::unique_ptr<Image> Graphics[4];    /* regular bitmaps */
+    std::unique_ptr<weld::Widget> Graphics[4];    /* regular bitmaps */
     sal_uInt16 Minimum[4];
     sal_uInt16 Maximum[4];
     sal_uInt16 Value[4];
 
 public:
-    SmCategoryDesc(VclBuilderContainer& rBuilder, sal_uInt16 nCategoryIdx);
+    SmCategoryDesc(weld::Builder& rBuilder, sal_uInt16 nCategoryIdx);
     ~SmCategoryDesc();
 
     const OUString& GetName() const                 { return Name; }
@@ -195,52 +195,49 @@ public:
     sal_uInt16          GetValue(sal_uInt16 Index) const    { return Value[Index]; }
     void            SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;}
 
-    const Image *  GetGraphic(sal_uInt16 Index) const
+    weld::Widget* GetGraphic(sal_uInt16 Index) const
     {
         return Graphics[Index].get();
     }
 };
 
-
-class SmDistanceDialog : public ModalDialog
+class SmDistanceDialog : public weld::GenericDialogController
 {
-    VclPtr<VclFrame>       m_pFrame;
-    VclPtr<FixedText>      m_pFixedText1;
-    VclPtr<MetricField>    m_pMetricField1;
-    VclPtr<FixedText>      m_pFixedText2;
-    VclPtr<MetricField>    m_pMetricField2;
-    VclPtr<FixedText>      m_pFixedText3;
-    VclPtr<MetricField>    m_pMetricField3;
-    VclPtr<CheckBox>       m_pCheckBox1;
-    VclPtr<FixedText>      m_pFixedText4;
-    VclPtr<MetricField>    m_pMetricField4;
-    VclPtr<MenuButton>     m_pMenuButton;
-    VclPtr<PushButton>     m_pDefaultButton;
-    VclPtr<FixedImage>     m_pBitmap;
+    std::unique_ptr<weld::Frame> m_xFrame;
+    std::unique_ptr<weld::Label> m_xFixedText1;
+    std::unique_ptr<weld::MetricSpinButton>    m_xMetricField1;
+    std::unique_ptr<weld::Label> m_xFixedText2;
+    std::unique_ptr<weld::MetricSpinButton>    m_xMetricField2;
+    std::unique_ptr<weld::Label> m_xFixedText3;
+    std::unique_ptr<weld::MetricSpinButton>    m_xMetricField3;
+    std::unique_ptr<weld::CheckButton> m_xCheckBox1;
+    std::unique_ptr<weld::Label> m_xFixedText4;
+    std::unique_ptr<weld::MetricSpinButton> m_xMetricField4;
+    std::unique_ptr<weld::MenuButton> m_xMenuButton;
+    std::unique_ptr<weld::Button> m_xDefaultButton;
+    std::unique_ptr<weld::Widget> m_xBitmap;
+
+    weld::Widget* m_pCurrentImage;
 
     SmCategoryDesc *Categories[NOCATEGORIES];
     sal_uInt16          nActiveCategory;
     bool            bScaleAllBrackets;
 
-    DECL_LINK(GetFocusHdl, Control&, void);
-    DECL_LINK(MenuSelectHdl, Menu *, bool);
-    DECL_LINK(DefaultButtonClickHdl, Button *, void);
-    DECL_LINK(CheckBoxClickHdl, Button *, void);
+    DECL_LINK(GetFocusHdl, weld::Widget&, void);
+    DECL_LINK(MenuSelectHdl, const OString&, void);
+    DECL_LINK(DefaultButtonClickHdl, weld::Button&, void);
+    DECL_LINK(CheckBoxClickHdl, weld::ToggleButton&, void);
 
-    using   Window::SetHelpId;
-    static void SetHelpId(MetricField &rField, const OString& sHelpId);
     void    SetCategory(sal_uInt16 Category);
 
 public:
-    SmDistanceDialog(vcl::Window *pParent);
+    SmDistanceDialog(weld::Window *pParent);
     virtual ~SmDistanceDialog() override;
-    virtual void dispose() override;
 
     void ReadFrom(const SmFormat &rFormat);
     void WriteTo (SmFormat &rFormat);
 };
 
-
 /**************************************************************************/
 
 
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index e8afccc2586d..e1f744c053f3 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -620,23 +620,22 @@ static const FieldMinMax pMinMaxData[10][4] =
     {{ 0, 10000 },  { 0, 10000 },   { 0, 10000 },   { 0, 10000 }}
 };
 
-SmCategoryDesc::SmCategoryDesc(VclBuilderContainer& rBuilder, sal_uInt16 nCategoryIdx)
+SmCategoryDesc::SmCategoryDesc(weld::Builder& rBuilder, sal_uInt16 nCategoryIdx)
 {
     ++nCategoryIdx;
-    FixedText* pTitle = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"title");
-    if (pTitle)
+    std::unique_ptr<weld::Label> xTitle(rBuilder.weld_label(OString::number(nCategoryIdx)+"title"));
+    if (xTitle)
     {
-        Name = pTitle->GetText();
+        Name = xTitle->get_label();
     }
     for (int i = 0; i < 4; ++i)
     {
-        FixedText* pLabel = rBuilder.get<FixedText>(OString::number(nCategoryIdx)+"label"+OString::number(i+1));
+        std::unique_ptr<weld::Label> xLabel(rBuilder.weld_label(OString::number(nCategoryIdx)+"label"+OString::number(i+1)));
 
-        if (pLabel)
+        if (xLabel)
         {
-            Strings[i] = pLabel->GetText();
-            FixedImage* pImage = rBuilder.get<FixedImage>(OString::number(nCategoryIdx)+"image"+OString::number(i+1));
-            Graphics[i].reset(new Image(pImage->GetImage()));
+            Strings[i] = xLabel->get_label();
+            Graphics[i].reset(rBuilder.weld_widget(OString::number(nCategoryIdx)+"image"+OString::number(i+1)));
         }
         else
         {
@@ -656,36 +655,38 @@ SmCategoryDesc::~SmCategoryDesc()
 
 /**************************************************************************/
 
-IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control&, rControl, void )
+IMPL_LINK( SmDistanceDialog, GetFocusHdl, weld::Widget&, rControl, void )
 {
     if (Categories[nActiveCategory])
     {
         sal_uInt16  i;
 
-        if (&rControl == m_pMetricField1)
+        if (&rControl == m_xMetricField1->get_widget())
             i = 0;
-        else if (&rControl == m_pMetricField2)
+        else if (&rControl == m_xMetricField2->get_widget())
             i = 1;
-        else if (&rControl == m_pMetricField3)
+        else if (&rControl == m_xMetricField3->get_widget())
             i = 2;
-        else if (&rControl == m_pMetricField4)
+        else if (&rControl == m_xMetricField4->get_widget())
             i = 3;
         else
             return;
-        m_pBitmap->SetImage(*(Categories[nActiveCategory]->GetGraphic(i)));
+        if (m_pCurrentImage)
+            m_pCurrentImage->hide();
+        m_pCurrentImage = Categories[nActiveCategory]->GetGraphic(i);
+        m_pCurrentImage->show();
     }
 }
 
-IMPL_LINK( SmDistanceDialog, MenuSelectHdl, Menu *, pMenu, bool )
+IMPL_LINK(SmDistanceDialog, MenuSelectHdl, const OString&, rId, void)
 {
-    SetCategory(pMenu->GetCurItemId() - 1);
-    return false;
+    assert(rId.startsWith("menuitem"));
+    SetCategory(rId.replaceFirst("menuitem", "").toInt32() - 1);
 }
 
-
-IMPL_LINK_NOARG( SmDistanceDialog, DefaultButtonClickHdl, Button *, void )
+IMPL_LINK_NOARG( SmDistanceDialog, DefaultButtonClickHdl, weld::Button&, void )
 {
-    SaveDefaultsQuery aQuery(GetFrameWeld());
+    SaveDefaultsQuery aQuery(m_xDialog.get());
     if (aQuery.run() == RET_YES)
     {
         SmModule *pp = SM_MOD();
@@ -695,36 +696,16 @@ IMPL_LINK_NOARG( SmDistanceDialog, DefaultButtonClickHdl, Button *, void )
     }
 }
 
-IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, Button *, pCheckBox, void )
+IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, weld::ToggleButton&, rCheckBox, void )
 {
-    if (pCheckBox == m_pCheckBox1)
+    if (&rCheckBox == m_xCheckBox1.get())
     {
-        m_pCheckBox1->Toggle();
-
-        bool bChecked = m_pCheckBox1->IsChecked();
-        m_pFixedText4->Enable( bChecked );
-        m_pMetricField4->Enable( bChecked );
+        bool bChecked = m_xCheckBox1->get_active();
+        m_xFixedText4->set_sensitive( bChecked );
+        m_xMetricField4->set_sensitive( bChecked );
     }
 }
 
-
-void SmDistanceDialog::SetHelpId(MetricField &rField, const OString& sHelpId)
-{
-    rField.SetHelpId(sHelpId);
-    rField.SetHelpText("");
-
-    // since MetricField inherits from SpinField which has a sub Edit field
-    // (which is actually the one we modify) we have to set the help-id
-    // for it too.
-    Edit *pSubEdit = rField.GetSubEdit();
-    if (pSubEdit)
-    {
-        pSubEdit->SetHelpId(sHelpId);
-        pSubEdit->SetHelpText("");
-    }
-}
-
-
 void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
 {
     assert(nCategory < NOCATEGORIES && "Sm: wrong category number in SmDistanceDialog");
@@ -747,12 +728,12 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
     };
 
     // array to help iterate over the controls
-    vcl::Window * const  aWin[4][2] =
+    std::pair<weld::Label*, weld::MetricSpinButton*> const aWin[4] =
     {
-        { m_pFixedText1, m_pMetricField1 },
-        { m_pFixedText2, m_pMetricField2 },
-        { m_pFixedText3, m_pMetricField3 },
-        { m_pFixedText4, m_pMetricField4 }
+        { m_xFixedText1.get(), m_xMetricField1.get() },
+        { m_xFixedText2.get(), m_xMetricField2.get() },
+        { m_xFixedText3.get(), m_xMetricField3.get() },
+        { m_xFixedText4.get(), m_xMetricField4.get() }
     };
 
     SmCategoryDesc *pCat;
@@ -762,32 +743,32 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
     if (nActiveCategory != CATEGORY_NONE)
     {
         pCat = Categories[nActiveCategory];
-        pCat->SetValue(0, sal::static_int_cast<sal_uInt16>(m_pMetricField1->GetValue()));
-        pCat->SetValue(1, sal::static_int_cast<sal_uInt16>(m_pMetricField2->GetValue()));
-        pCat->SetValue(2, sal::static_int_cast<sal_uInt16>(m_pMetricField3->GetValue()));
-        pCat->SetValue(3, sal::static_int_cast<sal_uInt16>(m_pMetricField4->GetValue()));
+        pCat->SetValue(0, sal::static_int_cast<sal_uInt16>(m_xMetricField1->get_value(FUNIT_NONE)));
+        pCat->SetValue(1, sal::static_int_cast<sal_uInt16>(m_xMetricField2->get_value(FUNIT_NONE)));
+        pCat->SetValue(2, sal::static_int_cast<sal_uInt16>(m_xMetricField3->get_value(FUNIT_NONE)));
+        pCat->SetValue(3, sal::static_int_cast<sal_uInt16>(m_xMetricField4->get_value(FUNIT_NONE)));
 
         if (nActiveCategory == 5)
-            bScaleAllBrackets = m_pCheckBox1->IsChecked();
+            bScaleAllBrackets = m_xCheckBox1->get_active();
 
-        m_pMenuButton->GetPopupMenu()->CheckItem(nActiveCategory + 1, false);
+        m_xMenuButton->set_active("menuitem" + OString::number(nActiveCategory + 1), false);
     }
 
     // activation/deactivation of the associated controls depending on the chosen category
     bool  bActive;
     for (sal_uInt16 i = 0;  i < 4;  i++)
     {
-        FixedText   *pFT = static_cast<FixedText *>  ( aWin[i][0] );
-        MetricField *pMF = static_cast<MetricField *>( aWin[i][1] );
+        weld::Label *pFT = aWin[i].first;
+        weld::MetricSpinButton *pMF = aWin[i].second;
 
         // To determine which Controls should be active, the existence
         // of an associated HelpID is checked
         bActive = aCatMf2Hid[nCategory][i] != nullptr;
 
-        pFT->Show(bActive);
-        pFT->Enable(bActive);
-        pMF->Show(bActive);
-        pMF->Enable(bActive);
+        pFT->show(bActive);
+        pFT->set_sensitive(bActive);
+        pMF->show(bActive);
+        pMF->set_sensitive(bActive);
 
         // set measurement unit and number of decimal places
         FieldUnit  eUnit;
@@ -802,106 +783,79 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
             eUnit   = FUNIT_100TH_MM;
             nDigits = 2;
         }
-        pMF->SetUnit(eUnit);            // changes the value
-        pMF->SetDecimalDigits(nDigits);
+        pMF->set_unit(eUnit);            // changes the value
+        pMF->set_digits(nDigits);
 
         if (bActive)
         {
             pCat = Categories[nCategory];
-            pFT->SetText(pCat->GetString(i));
+            pFT->set_label(pCat->GetString(i));
 
-            pMF->SetMin(pCat->GetMinimum(i));
-            pMF->SetMax(pCat->GetMaximum(i));
-            pMF->SetValue(pCat->GetValue(i));
+            pMF->set_range(pCat->GetMinimum(i), pCat->GetMaximum(i), FUNIT_NONE);
+            pMF->set_value(pCat->GetValue(i), FUNIT_NONE);
 
-            SetHelpId(*pMF, aCatMf2Hid[nCategory][i]);
+            pMF->set_help_id(aCatMf2Hid[nCategory][i]);
         }
     }
     // activate the CheckBox and the associated MetricField if we're dealing with the brackets menu
     bActive = nCategory == 5;
-    m_pCheckBox1->Show(bActive);
-    m_pCheckBox1->Enable(bActive);
+    m_xCheckBox1->set_visible(bActive);
+    m_xCheckBox1->set_sensitive(bActive);
     if (bActive)
     {
-        m_pCheckBox1->Check( bScaleAllBrackets );
+        m_xCheckBox1->set_active(bScaleAllBrackets);
 
-        bool bChecked = m_pCheckBox1->IsChecked();
-        m_pFixedText4->Enable( bChecked );
-        m_pMetricField4->Enable( bChecked );
+        bool bChecked = m_xCheckBox1->get_active();
+        m_xFixedText4->set_sensitive( bChecked );
+        m_xMetricField4->set_sensitive( bChecked );
     }
 
-    m_pMenuButton->GetPopupMenu()->CheckItem(nCategory + 1);
-    m_pFrame->set_label(Categories[nCategory]->GetName());
+    m_xMenuButton->set_active("menuitem" + OString::number(nCategory + 1), true);
+    m_xFrame->set_label(Categories[nCategory]->GetName());
 
     nActiveCategory = nCategory;
 
-    m_pMetricField1->GrabFocus();
-    Invalidate();
-    Update();
-}
-
-
-SmDistanceDialog::SmDistanceDialog(vcl::Window *pParent)
-    : ModalDialog(pParent, "SpacingDialog",
-        "modules/smath/ui/spacingdialog.ui")
+    m_xMetricField1->grab_focus();
+}
+
+SmDistanceDialog::SmDistanceDialog(weld::Window *pParent)
+    : GenericDialogController(pParent, "modules/smath/ui/spacingdialog.ui", "SpacingDialog")
+    , m_xFrame(m_xBuilder->weld_frame("template"))
+    , m_xFixedText1(m_xBuilder->weld_label("label1"))
+    , m_xMetricField1(m_xBuilder->weld_metric_spin_button("spinbutton1", FUNIT_CM))
+    , m_xFixedText2(m_xBuilder->weld_label("label2"))
+    , m_xMetricField2(m_xBuilder->weld_metric_spin_button("spinbutton2", FUNIT_CM))
+    , m_xFixedText3(m_xBuilder->weld_label("label3"))
+    , m_xMetricField3(m_xBuilder->weld_metric_spin_button("spinbutton3", FUNIT_CM))
+    , m_xCheckBox1(m_xBuilder->weld_check_button("checkbutton"))
+    , m_xFixedText4(m_xBuilder->weld_label("label4"))
+    , m_xMetricField4(m_xBuilder->weld_metric_spin_button("spinbutton4", FUNIT_CM))
+    , m_xMenuButton(m_xBuilder->weld_menu_button("category"))
+    , m_xDefaultButton(m_xBuilder->weld_button("default"))
+    , m_xBitmap(m_xBuilder->weld_widget("image"))
+    , m_pCurrentImage(m_xBitmap.get())
 {
-    get(m_pFrame, "template");
-    get(m_pFixedText1, "label1");
-    get(m_pMetricField1, "spinbutton1");
-    get(m_pFixedText2, "label2");
-    get(m_pMetricField2, "spinbutton2");
-    get(m_pFixedText3, "label3");
-    get(m_pMetricField3, "spinbutton3");
-    get(m_pCheckBox1, "checkbutton");
-    get(m_pFixedText4, "label4");
-    get(m_pMetricField4, "spinbutton4");
-    get(m_pMenuButton, "category");
-    get(m_pDefaultButton, "default");
-    get(m_pBitmap, "image");
-
     for (sal_uInt16 i = 0; i < NOCATEGORIES; ++i)
-        Categories[i] = new SmCategoryDesc(*this, i);
+        Categories[i] = new SmCategoryDesc(*m_xBuilder, i);
     nActiveCategory   = CATEGORY_NONE;
     bScaleAllBrackets = false;
 
-    // preview like controls should have a 2D look
-    m_pBitmap->SetBorderStyle( WindowBorderStyle::MONO );
-
-    m_pMetricField1->SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
-    m_pMetricField2->SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
-    m_pMetricField3->SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
-    m_pMetricField4->SetGetFocusHdl(LINK(this, SmDistanceDialog, GetFocusHdl));
-    m_pCheckBox1->SetClickHdl(LINK(this, SmDistanceDialog, CheckBoxClickHdl));
+    m_xMetricField1->connect_focus_in(LINK(this, SmDistanceDialog, GetFocusHdl));
+    m_xMetricField2->connect_focus_in(LINK(this, SmDistanceDialog, GetFocusHdl));
+    m_xMetricField3->connect_focus_in(LINK(this, SmDistanceDialog, GetFocusHdl));
+    m_xMetricField4->connect_focus_in(LINK(this, SmDistanceDialog, GetFocusHdl));
+    m_xCheckBox1->connect_toggled(LINK(this, SmDistanceDialog, CheckBoxClickHdl));
+    m_xMenuButton->connect_selected(LINK(this, SmDistanceDialog, MenuSelectHdl));
+    m_xDefaultButton->connect_clicked(LINK(this, SmDistanceDialog, DefaultButtonClickHdl));
 
-    m_pMenuButton->GetPopupMenu()->SetSelectHdl(LINK(this, SmDistanceDialog, MenuSelectHdl));
-
-    m_pDefaultButton->SetClickHdl(LINK(this, SmDistanceDialog, DefaultButtonClickHdl));
+    //set the initial size, with max visible widgets visible, as preferred size
+    m_xDialog->set_size_request(-1, m_xDialog->get_preferred_size().Height());
 }
 
-
 SmDistanceDialog::~SmDistanceDialog()
 {
-    disposeOnce();
-}
-
-void SmDistanceDialog::dispose()
-{
     for (SmCategoryDesc* & rpDesc : Categories)
         DELETEZ(rpDesc);
-    m_pFrame.clear();
-    m_pFixedText1.clear();
-    m_pMetricField1.clear();
-    m_pFixedText2.clear();
-    m_pMetricField2.clear();
-    m_pFixedText3.clear();
-    m_pMetricField3.clear();
-    m_pCheckBox1.clear();
-    m_pFixedText4.clear();
-    m_pMetricField4.clear();
-    m_pMenuButton.clear();
-    m_pDefaultButton.clear();
-    m_pBitmap.clear();
-    ModalDialog::dispose();
 }
 
 void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 9eac89d5f474..b11eb4545618 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -973,15 +973,15 @@ void SmDocShell::Execute(SfxRequest& rReq)
 
         case SID_DISTANCE:
         {
-            VclPtrInstance< SmDistanceDialog > xDistanceDialog(nullptr);
+            SmDistanceDialog aDistanceDialog(rReq.GetFrameWeld());
 
             SmFormat aOldFormat  = GetFormat();
-            xDistanceDialog->ReadFrom( aOldFormat );
-            if (xDistanceDialog->Execute() == RET_OK)
+            aDistanceDialog.ReadFrom( aOldFormat );
+            if (aDistanceDialog.run() == RET_OK)
             {
                 SmFormat aNewFormat( aOldFormat );
 
-                xDistanceDialog->WriteTo(aNewFormat);
+                aDistanceDialog.WriteTo(aNewFormat);
 
                 ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
                 if (pTmpUndoMgr)
diff --git a/starmath/uiconfig/smath/ui/spacingdialog.ui b/starmath/uiconfig/smath/ui/spacingdialog.ui
index b69843bdb7ff..7f3144575a9e 100644
--- a/starmath/uiconfig/smath/ui/spacingdialog.ui
+++ b/starmath/uiconfig/smath/ui/spacingdialog.ui
@@ -1,32 +1,152 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.4 -->
 <interface domain="sm">
   <requires lib="gtk+" version="3.18"/>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkMenu" id="menu">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem1">Spacing</property>
+        <property name="use_underline">True</property>
+        <property name="active">True</property>
+        <property name="draw_as_radio">True</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem2">Indexes</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem3">Fractions</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem4">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem4">Fraction Bars</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem5">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem5">Limits</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem6">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem6">Brackets</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem7">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem7">Matrices</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem8">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem8">Symbols</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem9">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem9">Operators</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioMenuItem" id="menuitem10">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="spacingdialog|menuitem10">Borders</property>
+        <property name="use_underline">True</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">menuitem1</property>
+      </object>
+    </child>
+  </object>
   <object class="GtkDialog" id="SpacingDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="spacingdialog|SpacingDialog">Spacing</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox4">
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area4">
             <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="layout_style">start</property>
+            <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
+              <object class="GtkButton" id="default">
+                <property name="label" translatable="yes" context="spacingdialog|default">_Default</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -35,47 +155,52 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkMenuButton" id="category">
+                <property name="label" translatable="yes" context="spacingdialog|category">_Category</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
+                <property name="use_underline">True</property>
+                <property name="popup">menu</property>
+                <property name="use_popover">False</property>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
-                <property name="expand">False</property>
+                <property name="expand">True</property>
                 <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="category:menu">
-                <property name="label" translatable="yes" context="spacingdialog|category">_Category</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">2</property>
-                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="default">
-                <property name="label" translatable="yes" context="spacingdialog|default">_Default</property>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">3</property>
-                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
@@ -142,23 +267,16 @@
                               <object class="GtkGrid" id="grid2">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="hexpand">True</property>
                                 <property name="row_spacing">6</property>
                                 <property name="column_spacing">12</property>
                                 <child>
-                                  <object class="GtkSpinButton" id="spinbutton1:0.00cm">
-                                    <property name="can_focus">True</property>
-                                    <property name="no_show_all">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkSpinButton" id="spinbutton2:0.00cm">
+                                  <object class="GtkSpinButton" id="spinbutton2">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">True</property>
+                                    <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
                                     <property name="no_show_all">True</property>
+                                    <property name="activates_default">True</property>
+                                    <property name="adjustment">adjustment2</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -166,9 +284,13 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkSpinButton" id="spinbutton3:0.00cm">
+                                  <object class="GtkSpinButton" id="spinbutton3">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">True</property>
+                                    <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
                                     <property name="no_show_all">True</property>
+                                    <property name="activates_default">True</property>
+                                    <property name="adjustment">adjustment3</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -177,12 +299,13 @@
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label1">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="no_show_all">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="no">String 1</property>
+                                    <property name="label">String 1</property>
                                     <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">spinbutton1:0.00cm</property>
+                                    <property name="mnemonic_widget">spinbutton1</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -191,12 +314,13 @@
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label2">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="no_show_all">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="no">String 2</property>
+                                    <property name="label">String 2</property>
                                     <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">spinbutton2:0.00cm</property>
+                                    <property name="mnemonic_widget">spinbutton2</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -205,12 +329,13 @@
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label3">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="no_show_all">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="no">String 3</property>
+                                    <property name="label">String 3</property>
                                     <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">spinbutton3:0.00cm</property>
+                                    <property name="mnemonic_widget">spinbutton3</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -218,9 +343,13 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkSpinButton" id="spinbutton4:0.00cm">
+                                  <object class="GtkSpinButton" id="spinbutton4">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">True</property>
+                                    <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
                                     <property name="no_show_all">True</property>
+                                    <property name="activates_default">True</property>
+                                    <property name="adjustment">adjustment4</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -229,12 +358,13 @@
                                 </child>
                                 <child>
                                   <object class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="no_show_all">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="no">String 4</property>
+                                    <property name="label">String 4</property>
                                     <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">spinbutton4:0.00cm</property>
+                                    <property name="mnemonic_widget">spinbutton4</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -256,6 +386,20 @@
                                     <property name="width">2</property>
                                   </packing>
                                 </child>
+                                <child>
+                                  <object class="GtkSpinButton" id="spinbutton1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
+                                    <property name="no_show_all">True</property>
+                                    <property name="activates_default">True</property>
+                                    <property name="adjustment">adjustment1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                  </packing>
+                                </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -264,26 +408,293 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkBox" id="box6">
+                              <object class="GtkBox" id="imagebox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="halign">center</property>
+                                <property name="valign">start</property>
+                                <property name="hexpand">True</property>
                                 <property name="orientation">vertical</property>
                                 <child>
+                                  <object class="GtkImage" id="4image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist41.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="7image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist71.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="10image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist101.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="1image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist11.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="5image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist51.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="3image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist31.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="8image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist81.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="9image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist91.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="2image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist21.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="6image1">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist61.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="8image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist82.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="3image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist32.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="6image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist62.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="2image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist22.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="9image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist92.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="7image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist72.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="4image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist42.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="5image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist52.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="1image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist12.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="10image2">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist102.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="1image3">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist13.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="6image4">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist61.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="10image3">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist103.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkImage" id="10image4">
+                                    <property name="can_focus">False</property>
+                                    <property name="icon_name">starmath/res/dist104.png</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                                <child>
                                   <object class="GtkImage" id="image">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="stock">gtk-missing-image</property>
+                                    <property name="icon_name">starmath/res/dist104.png</property>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">0</property>
+                                    <property name="position">10</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
-                                <property name="fill">True</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -302,9 +713,9 @@
                   <object class="GtkLabel" id="title">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
                     <property name="label" translatable="yes" context="spacingdialog|title">Title</property>
                     <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
                     </attributes>
@@ -357,94 +768,46 @@
                                   <object class="GtkLabel" id="1label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|1label1">_Spacing:</property>
                                     <property name="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="1label2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
-                                    <property name="label" translatable="yes" context="spacingdialog|1label2">_Line spacing:</property>
-                                    <property name="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="1label3">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes" context="spacingdialog|1label3">_Root spacing:</property>
-                                    <property name="use_underline">True</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">2</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox" id="box10">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="1image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist11.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkImage" id="1image2">
+                                  <object class="GtkLabel" id="1label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist12.png</property>
+                                    <property name="label" translatable="yes" context="spacingdialog|1label2">_Line spacing:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkImage" id="1image3">
+                                  <object class="GtkLabel" id="1label3">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist13.png</property>
+                                    <property name="label" translatable="yes" context="spacingdialog|1label3">_Root spacing:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">2</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">2</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">True</property>
-                                <property name="position">1</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                           </object>
@@ -516,9 +879,9 @@
                                   <object class="GtkLabel" id="2label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|2label1">_Superscript:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -529,9 +892,9 @@
                                   <object class="GtkLabel" id="2label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|2label2">S_ubscript:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -545,42 +908,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box13">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="2image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist21.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="2image2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist22.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -650,9 +977,9 @@
                                   <object class="GtkLabel" id="3label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|3label1">_Numerator:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -663,9 +990,9 @@
                                   <object class="GtkLabel" id="3label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|3label2">_Denominator:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -679,42 +1006,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box16">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="3image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist31.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="3image2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist32.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -784,9 +1075,9 @@
                                   <object class="GtkLabel" id="4label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|4label1">_Excess length:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -797,9 +1088,9 @@
                                   <object class="GtkLabel" id="4label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|4label2">_Weight:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -813,42 +1104,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box19">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="4image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist41.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="4image2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist42.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -918,9 +1173,9 @@
                                   <object class="GtkLabel" id="5label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|5label1">_Upper limit:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -931,9 +1186,9 @@
                                   <object class="GtkLabel" id="5label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|5label2">_Lower limit:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -947,42 +1202,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box22">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="5image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist51.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="5image2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist52.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -1052,9 +1271,9 @@
                                   <object class="GtkLabel" id="6label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|6label1">_Excess size (left/right):</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -1065,9 +1284,9 @@
                                   <object class="GtkLabel" id="6label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|6label2">_Spacing:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -1078,9 +1297,9 @@
                                   <object class="GtkLabel" id="6label4">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|6label4">_Excess size:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -1094,54 +1313,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box25">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="6image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist61.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="6image2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist62.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkImage" id="6image4">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist61.png</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -1211,69 +1382,33 @@
                                   <object class="GtkLabel" id="7label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|7label1">_Line spacing:</property>
                                     <property name="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="7label2">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes" context="spacingdialog|7label2">_Column spacing:</property>
-                                    <property name="use_underline">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkBox" id="box28">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="7image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist71.png</property>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkImage" id="7image2">
+                                  <object class="GtkLabel" id="7label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="pixbuf">starmath/res/dist72.png</property>
+                                    <property name="label" translatable="yes" context="spacingdialog|7label2">_Column spacing:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
                                   </packing>
                                 </child>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
                                 <property name="fill">True</property>
-                                <property name="position">1</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                           </object>
@@ -1345,9 +1480,9 @@
                                   <object class="GtkLabel" id="8label1">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|8label1">_Primary height:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -1358,9 +1493,9 @@
                                   <object class="GtkLabel" id="8label2">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
                                     <property name="label" translatable="yes" context="spacingdialog|8label2">_Minimum spacing:</property>
                                     <property name="use_underline">True</property>
+                                    <property name="xalign">0</property>
                                   </object>
                                   <packing>
                                     <property name="left_attach">0</property>
@@ -1374,42 +1509,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="box31">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <object class="GtkImage" id="8image1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list