cui/source/inc/border.hxx      |    1 
 cui/source/tabpages/border.cxx |    7 ----
 cui/uiconfig/ui/borderpage.ui  |   59 +++++++++++++++++++++++------------------
 3 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 3746379f251091696b73463f7b27e8ef732dd20b
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Tue Nov 9 08:47:02 2021 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Tue Nov 9 10:12:27 2021 +0100

    tdf#48622 Fix layout issue when "Custom" was selected
    
    Change-Id: Ie32a763b88cfc26b61d942214b16e008179d410c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124898
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <[email protected]>

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 433ab7425e5c..2a3d14ed5062 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -129,7 +129,6 @@ private:
 
     std::unique_ptr<SvtLineListBox> m_xLbLineStyle;
     std::unique_ptr<ColorListBox> m_xLbLineColor;
-    std::unique_ptr<weld::Widget> m_xLineWidthGroup;
     std::unique_ptr<weld::ComboBox> m_xLineWidthLB;
     std::unique_ptr<weld::MetricSpinButton> m_xLineWidthMF;
 
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 0203cc7de375..3f6d0fe7b2d4 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -310,7 +310,6 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
     , m_xLbLineStyle(new 
SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb")))
     , m_xLbLineColor(new 
ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"),
                 [this]{ return GetDialogController()->getDialog(); }))
-    , m_xLineWidthGroup(m_xBuilder->weld_widget("gridlinewidth"))
     , m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb"))
     , m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", 
FieldUnit::POINT))
     , m_xSpacingFrame(m_xBuilder->weld_container("spacing"))
@@ -541,12 +540,6 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, 
weld::DialogControlle
     m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl 
) );
     m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl 
) );
 
-    // lock the group to its original width where both widgets are shown so the
-    // notebook page contents don't jump around when the spinbox is
-    // hidden/shown
-    Size aOrigGroupSize(m_xLineWidthGroup->get_preferred_size());
-    m_xLineWidthGroup->set_size_request(aOrigGroupSize.Width(), -1);
-
     FillValueSets();
     FillLineListBox_Impl();
 
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index b629cb0c88dd..91fd315ce14e 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -211,8 +211,11 @@
                 <property name="can-focus">False</property>
                 <property name="label" translatable="yes" 
context="borderpage|label16">_Width:</property>
                 <property name="use-underline">True</property>
-                <property name="mnemonic-widget">linewidthmf</property>
                 <property name="xalign">0</property>
+                <accessibility>
+                  <relation type="label-for" target="linewidthlb"/>
+                  <relation type="label-for" target="linewidthmf"/>
+                </accessibility>
               </object>
               <packing>
                 <property name="left-attach">0</property>
@@ -250,12 +253,25 @@
               </packing>
             </child>
             <child>
-              <!-- n-columns=2 n-rows=1 -->
-              <object class="GtkGrid" id="gridlinewidth">
+              <object class="GtkMenuButton" id="linecolorlb">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="xalign">0</property>
+                <property name="draw-indicator">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="halign">start</property>
-                <property name="column-spacing">6</property>
                 <child>
                   <object class="GtkComboBoxText" id="linewidthlb">
                     <property name="visible">True</property>
@@ -270,25 +286,34 @@
                       <item translatable="yes" 
context="borderpage|linewidthlb">Extra thick</item>
                       <item translatable="yes" 
context="borderpage|linewidthlb">Custom</item>
                     </items>
+                    <accessibility>
+                      <relation type="labelled-by" target="label16"/>
+                    </accessibility>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkSpinButton" id="linewidthmf">
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
+                    <property name="hexpand">True</property>
                     <property name="activates-default">True</property>
                     <property name="truncate-multiline">True</property>
                     <property name="adjustment">adjustment1</property>
                     <property name="digits">2</property>
                     <property name="value">0.05</property>
+                    <accessibility>
+                      <relation type="labelled-by" target="label16"/>
+                    </accessibility>
                   </object>
                   <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
@@ -297,22 +322,6 @@
                 <property name="top-attach">2</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkMenuButton" id="linecolorlb">
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="xalign">0</property>
-                <property name="draw-indicator">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="left-attach">1</property>
-                <property name="top-attach">1</property>
-              </packing>
-            </child>
           </object>
         </child>
         <child type="label">

Reply via email to