libreoffice/libreoffice-clipped-sidebar-paragraph-widget.patch
Tomáš Chvátal 3b3fc7e503 Accepting request 817950 from home:badshah400:branches:LibreOffice:Factory
* Add patches from upstream to fix regressions:
  - libreoffice-stuck-widgets-in-sidebar.patch: some sidebar widgets getting stuck in a disabled state (boo#1173410, tdf#134360).
  - libreoffice-select-correct-item-in-gallery.patch: select the item in gallery before dragging it (boo#1173409, tdf#134285).
  - libreoffice-clipped-sidebar-paragraph-widget.patch: fix too wide and clipped paragraph widget in sidebar (boo#1173404, tdf#134357).

OBS-URL: https://build.opensuse.org/request/show/817950
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=903
2020-07-01 07:06:44 +00:00

190 lines
8.0 KiB
Diff

From f8e8b0d1747e16394d43eec7a1ef2b33b5678619 Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolanm@redhat.com>
Date: Tue, 30 Jun 2020 17:13:24 +0100
Subject: [PATCH] tdf#134357 we can reduce the min toolbar sidebar width
since,
commit 754bea8c6a17889f9d4d23bf98847b6b67253220
Date: Wed Apr 29 15:06:42 2020 +0100
remove the padding around the dropdown button of GtkMenuToolButtons
the GtkMenuToolButton aren't as wide anymore so we don't need a min of 5
GtkToolButtons widths for tdf#130197, now the max of either 4 GtkToolButtons or
that of 1 GtkToolButtons + 2 GtkMenuToolButton is sufficient
Change-Id: I7296805b4b3c0d86ce3d08cadc8c2659104af619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97502
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
---
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index f63196c..75f9319 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1446,9 +1446,11 @@
// use the, filled-in by dispatcher, width of measurewidth as the width
// of a "standard" column in a two column panel
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&rToolbar, "svx/ui/measurewidthbar.ui"));
- std::unique_ptr<weld::Toolbar> xToolbar(xBuilder->weld_toolbar("measurewidth"));
- std::unique_ptr<ToolbarUnoDispatcher> xDispatcher(new ToolbarUnoDispatcher(*xToolbar, *xBuilder, rFrame));
- nColumnWidth = xToolbar->get_preferred_size().Width();
+ std::unique_ptr<weld::Toolbar> xToolbar1(xBuilder->weld_toolbar("measurewidth1"));
+ std::unique_ptr<ToolbarUnoDispatcher> xDispatcher1(new ToolbarUnoDispatcher(*xToolbar1, *xBuilder, rFrame));
+ std::unique_ptr<weld::Toolbar> xToolbar2(xBuilder->weld_toolbar("measurewidth2"));
+ std::unique_ptr<ToolbarUnoDispatcher> xDispatcher2(new ToolbarUnoDispatcher(*xToolbar2, *xBuilder, rFrame));
+ nColumnWidth = std::max(xToolbar1->get_preferred_size().Width(), xToolbar2->get_preferred_size().Width());
eSize = rToolbar.get_icon_size();
}
rToolbar.set_size_request(nColumnWidth, -1);
diff --git a/svx/uiconfig/ui/measurewidthbar.ui b/svx/uiconfig/ui/measurewidthbar.ui
index ad96cc7..b901963 100644
--- a/svx/uiconfig/ui/measurewidthbar.ui
+++ b/svx/uiconfig/ui/measurewidthbar.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.22.2 -->
<interface domain="svx">
<requires lib="gtk+" version="3.18"/>
<object class="GtkBox">
@@ -7,65 +7,43 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkToolbar" id="measurewidth">
+ <object class="GtkToolbar" id="measurewidth1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="toolbar_style">icons</property>
<property name="show_arrow">False</property>
<property name="icon_size">2</property>
<child>
- <object class="GtkToolButton" id=".uno:MergeCells">
+ <object class="GtkMenuToolButton" id=".uno:TableCellBackgroundColor">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="homogeneous">True</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id=".uno:SplitCell">
+ <object class="GtkMenuToolButton" id=".uno:SetBorderStyle">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="homogeneous">True</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id=".uno:SplitTable">
+ <object class="GtkToolButton" id=".uno:InsertFormula">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id=".uno:DeleteColumns">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id=".uno:DeleteTable">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
</object>
@@ -75,5 +53,63 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkToolbar" id="measurewidth2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="toolbar_style">icons</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">2</property>
+ <child>
+ <object class="GtkToolButton" id=".uno:InsertRowsBefore">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id=".uno:InsertRowsAfter">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id=".uno:InsertColumnsBefore">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id=".uno:InsertColumnsAfter">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
</interface>