sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |    9 -----
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx |    1 
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui    |   35 +++++-----------------
 3 files changed, 9 insertions(+), 36 deletions(-)

New commits:
commit 26df8770efecb6f98f05ceffa5c81905582d1d3b
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon May 15 15:40:02 2023 +0200
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Mon May 15 22:51:03 2023 +0200

    tdf#154782 Fix scrolling in a11y sidebar
    
    Doesn't need its own scroll handler anymore,
    Sidebar has a generic scroll handler.
    
    Change-Id: Ic56d1cfd7cde8ed81bf36f3302a128aa03ff6f27
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151769
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <[email protected]>

diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index cd5d76e23cb0..854f7f151230 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -70,7 +70,6 @@ std::unique_ptr<PanelLayout> 
A11yCheckIssuesPanel::Create(weld::Widget* pParent,
 A11yCheckIssuesPanel::A11yCheckIssuesPanel(weld::Widget* pParent, SfxBindings* 
pBindings)
     : PanelLayout(pParent, "A11yCheckIssuesPanel", 
"modules/swriter/ui/a11ycheckissuespanel.ui")
     , m_xAccessibilityCheckBox(m_xBuilder->weld_box("accessibilityCheckBox"))
-    , m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow"))
     , mpBindings(pBindings)
     , mpDoc(nullptr)
     , maA11yCheckController(FN_STAT_ACCESSIBILITY_CHECK, *pBindings, *this)
@@ -131,14 +130,6 @@ void A11yCheckIssuesPanel::populateIssues()
         m_xAccessibilityCheckBox->reorder_child(xEntry->get_widget(), i++);
         m_aAccessibilityCheckEntries.push_back(std::move(xEntry));
     }
-
-    if (!m_aAccessibilityCheckEntries.empty())
-    {
-        auto nRowHeight
-            = 
m_aAccessibilityCheckEntries.back()->get_widget()->get_preferred_size().Height();
-        // 6 is the spacing set in the .ui
-        m_xScrolledWindow->vadjustment_set_step_increment(nRowHeight + 6);
-    }
 }
 
 void A11yCheckIssuesPanel::NotifyItemUpdate(const sal_uInt16 nSid, const 
SfxItemState /* eState */,
diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx
index 46d74c97f5a1..b3e33c049528 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx
@@ -61,7 +61,6 @@ public:
 private:
     std::vector<std::unique_ptr<AccessibilityCheckEntry>> 
m_aAccessibilityCheckEntries;
     std::unique_ptr<weld::Box> m_xAccessibilityCheckBox;
-    std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
     sfx::AccessibilityIssueCollection m_aIssueCollection;
     std::function<sfx::AccessibilityIssueCollection()> m_getIssueCollection;
     void populateIssues();
diff --git a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui 
b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
index b8581dd350b4..5a55d382a3cd 100644
--- a/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
+++ b/sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui
@@ -10,40 +10,23 @@
     <property name="vexpand">True</property>
     <property name="orientation">vertical</property>
     <child>
-      <object class="GtkScrolledWindow" id="scrolledwindow">
+      <object class="GtkBox" id="accessibilityCheckBox">
         <property name="visible">True</property>
-        <property name="can-focus">True</property>
+        <property name="can-focus">False</property>
+        <property name="valign">start</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
-        <property name="shadow-type">in</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <property name="homogeneous">True</property>
         <child>
-          <object class="GtkViewport">
-            <property name="visible">True</property>
-            <property name="can-focus">False</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <child>
-              <object class="GtkBox" id="accessibilityCheckBox">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="valign">start</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <property name="orientation">vertical</property>
-                <property name="spacing">6</property>
-                <property name="homogeneous">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-            </child>
-          </object>
+          <placeholder/>
         </child>
       </object>
       <packing>
-        <property name="expand">True</property>
+        <property name="expand">False</property>
         <property name="fill">True</property>
-        <property name="position">1</property>
+        <property name="position">0</property>
       </packing>
     </child>
   </object>

Reply via email to