diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2022-09-26 00:46:00 +0200 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2022-10-13 22:32:04 +0200 |
commit | 7fc96ad09520abea4833ed7410fd3a2d1b63d7b1 (patch) | |
tree | 5705c6ddacdc2b7bb582551c26c234bf743cde0e /sc/uiconfig/scalc | |
parent | 2b1d34679d8a5128bc13d932466c2a6464525627 (diff) |
tdf#150473 Wrap text and set min size for Function description
This patch does the following changes to the Functions sidebar in Calc:
1) The function description now uses a TextView instead of a Label so that the text can now wrap. This is important because many descriptions are long and require more than a single line of text.
2) The minimum size of the description TextView is set to 6 lines of text. Because there's no easy way to set this minimum size (since it is inside a Slider control), then the following rule was applied.
- If the user resizes the slider to less than 6 rows (in this case, moves it down), the next time a new function is clicked the slider is positioned so that 6 lines of text become visible.
- Moving the slider up, thus giving more space to the description view is still allowed as prior to this patch.
Change-Id: I52dfa8bef52b645fdce379408e6b790f6e8e5dea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140507
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc/uiconfig/scalc')
-rw-r--r-- | sc/uiconfig/scalc/ui/functionpanel.ui | 232 |
1 files changed, 104 insertions, 128 deletions
diff --git a/sc/uiconfig/scalc/ui/functionpanel.ui b/sc/uiconfig/scalc/ui/functionpanel.ui index 7959ffebf870..380bf7b6b651 100644 --- a/sc/uiconfig/scalc/ui/functionpanel.ui +++ b/sc/uiconfig/scalc/ui/functionpanel.ui @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sc"> <requires lib="gtk+" version="3.20"/> <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">sc/res/fx.png</property> + <property name="can-focus">False</property> + <property name="icon-name">sc/res/fx.png</property> </object> <object class="GtkTreeStore" id="liststore1"> <columns> @@ -18,184 +18,160 @@ <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid" id="FunctionPanel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=2 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> - <property name="row_spacing">6</property> + <property name="border-width">6</property> + <property name="row-spacing">6</property> <child> - <object class="GtkPaned" id="splitter"> + <!-- n-columns=1 n-rows=2 --> + <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="orientation">vertical</property> - <property name="wide_handle">True</property> + <property name="row-spacing">6</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> + <property name="column-spacing">12</property> <child> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid"> + <object class="GtkButton" id="insert"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkButton" id="insert"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="functionpanel|insert|tooltip_text">Insert Function into calculation sheet</property> - <property name="image">image1</property> - <property name="always-show-image">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="category"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="functionpanel|category">Last Used</item> - <item translatable="yes" context="functionpanel|category">All</item> - <item translatable="yes" context="functionpanel|category">Database</item> - <item translatable="yes" context="functionpanel|category">Date&Time</item> - <item translatable="yes" context="functionpanel|category">Financial</item> - <item translatable="yes" context="functionpanel|category">Information</item> - <item translatable="yes" context="functionpanel|category">Logical</item> - <item translatable="yes" context="functionpanel|category">Mathematical</item> - <item translatable="yes" context="functionpanel|category">Array</item> - <item translatable="yes" context="functionpanel|category">Statistical</item> - <item translatable="yes" context="functionpanel|category">Spreadsheet</item> - <item translatable="yes" context="functionpanel|category">Text</item> - <item translatable="yes" context="functionpanel|category">Add-in</item> - </items> - <child internal-child="accessible"> - <object class="AtkObject" id="category-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="functionpanel|extended_tip|category">Displays the available functions.</property> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="functionpanel|insert|tooltip_text">Insert Function into calculation sheet</property> + <property name="image">image1</property> + <property name="always-show-image">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> - <object class="GtkScrolledWindow"> + <object class="GtkComboBoxText" id="category"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTreeView" id="funclist"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="vexpand">True</property> - <property name="model">liststore1</property> - <property name="headers_visible">False</property> - <property name="headers_clickable">False</property> - <property name="search_column">0</property> - <property name="show_expanders">False</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeview-selection1"/> - </child> - <child> - <object class="GtkTreeViewColumn" id="treeviewcolumn1"> - <child> - <object class="GtkCellRendererText" id="cellrenderertext1"/> - <attributes> - <attribute name="text">0</attribute> - </attributes> - </child> - </object> - </child> - <child internal-child="accessible"> - <object class="AtkObject" id="funclist-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="functionpanel|extended_tip|funclist">Displays the available functions.</property> - </object> - </child> + <items> + <item translatable="yes" context="functionpanel|category">Last Used</item> + <item translatable="yes" context="functionpanel|category">All</item> + <item translatable="yes" context="functionpanel|category">Database</item> + <item translatable="yes" context="functionpanel|category">Date&Time</item> + <item translatable="yes" context="functionpanel|category">Financial</item> + <item translatable="yes" context="functionpanel|category">Information</item> + <item translatable="yes" context="functionpanel|category">Logical</item> + <item translatable="yes" context="functionpanel|category">Mathematical</item> + <item translatable="yes" context="functionpanel|category">Array</item> + <item translatable="yes" context="functionpanel|category">Statistical</item> + <item translatable="yes" context="functionpanel|category">Spreadsheet</item> + <item translatable="yes" context="functionpanel|category">Text</item> + <item translatable="yes" context="functionpanel|category">Add-in</item> + </items> + <child internal-child="accessible"> + <object class="AtkObject" id="category-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="functionpanel|extended_tip|category">Displays the available functions.</property> </object> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> <packing> - <property name="resize">True</property> - <property name="shrink">True</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> - <object class="GtkScrolledWindow" id="funcscroll"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="shadow-type">in</property> <child> - <object class="GtkViewport"> + <object class="GtkTreeView" id="funclist"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers-visible">False</property> + <property name="headers-clickable">False</property> + <property name="search-column">0</property> + <property name="show-expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection"/> + </child> <child> - <object class="GtkLabel" id="funcdesc"> - <property name="name">funcdesc</property> - <property name="width_request">0</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="functionpanel|funcdesc">label</property> - <property name="wrap">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + </child> + <child internal-child="accessible"> + <object class="AtkObject" id="funclist-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="functionpanel|extended_tip|funclist">Displays the available functions.</property> </object> </child> </object> </child> </object> <packing> - <property name="resize">False</property> - <property name="shrink">True</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="funcscroll"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="valign">end</property> + <property name="shadow-type">in</property> + <child> + <object class="GtkTextView" id="funcdesc"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="editable">False</property> + <property name="wrap-mode">word-char</property> + <property name="cursor-visible">False</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> </object> |