make Notebookbar customize page match indent with the others

remove intermediate grids with just one child, name the containers
of the groups of widgets to be hidden and hide the container rather
than the individual members so the container space doesn't push
this page out of alignment with the others.

Change-Id: Ie3fb291da49a6b43ca4516e5fe55b828543631e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143838
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-12-08 20:34:21 +00:00
parent 7938f3f84d
commit e7f62648f0
4 changed files with 32 additions and 54 deletions

View file

@ -107,14 +107,11 @@ SvxNotebookbarConfigPage::SvxNotebookbarConfigPage(weld::Container* pPage,
m_xDescriptionField->set_visible(false);
m_xMoveUpButton->set_visible(false);
m_xMoveDownButton->set_visible(false);
m_xAddCommandButton->set_visible(false);
m_xRemoveCommandButton->set_visible(false);
m_xCommandButtons->set_visible(false);
m_xLeftFunctionLabel->set_visible(false);
m_xSearchLabel->set_visible(false);
m_xCategoryLabel->set_visible(false);
m_xInsertBtn->set_visible(false);
m_xModifyBtn->set_visible(false);
m_xResetBtn->set_visible(false);
m_xCustomizeBox->set_visible(false);
m_xCustomizeLabel->set_visible(false);
weld::TreeView& rCommandCategoryBox = m_xFunctions->get_widget();

View file

@ -1009,9 +1009,11 @@ SvxConfigPage::SvxConfigPage(weld::Container* pPage, weld::DialogController* pCo
, m_xMoveUpButton(m_xBuilder->weld_button("up"))
, m_xMoveDownButton(m_xBuilder->weld_button("down"))
, m_xSaveInListBox(m_xBuilder->weld_combo_box("savein"))
, m_xCustomizeBox(m_xBuilder->weld_widget("customizebox"))
, m_xInsertBtn(m_xBuilder->weld_menu_button("insert"))
, m_xModifyBtn(m_xBuilder->weld_menu_button("modify"))
, m_xResetBtn(m_xBuilder->weld_button("defaultsbtn"))
, m_xCommandButtons(m_xBuilder->weld_widget("arrowgrid"))
, m_xAddCommandButton(m_xBuilder->weld_button("add"))
, m_xRemoveCommandButton(m_xBuilder->weld_button("remove"))
{

View file

@ -411,12 +411,14 @@ protected:
std::unique_ptr<weld::ComboBox> m_xSaveInListBox;
std::unique_ptr<weld::Widget> m_xCustomizeBox;
std::unique_ptr<weld::MenuButton> m_xInsertBtn;
std::unique_ptr<weld::MenuButton> m_xModifyBtn;
// Used to reset the selected toolbar/menu/context menu
std::unique_ptr<weld::Button> m_xResetBtn;
// Middle buttons
std::unique_ptr<weld::Widget> m_xCommandButtons;
std::unique_ptr<weld::Button> m_xAddCommandButton;
std::unique_ptr<weld::Button> m_xRemoveCommandButton;

View file

@ -674,7 +674,7 @@
</packing>
</child>
<child>
<object class="GtkButtonBox">
<object class="GtkButtonBox" id="customizebox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
@ -762,7 +762,7 @@
</child>
<child>
<!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid" id="grid7">
<object class="GtkGrid" id="arrowgrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
@ -770,32 +770,20 @@
<property name="margin-end">6</property>
<property name="row-spacing">6</property>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<object class="GtkButton" id="add">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-bottom">5</property>
<child>
<object class="GtkButton" id="add">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes" context="menuassignpage|add">Add item</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin-bottom">5</property>
<property name="image">image3</property>
<property name="always-show-image">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="add-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="menuassignpage|extended_tip|add">Click on the right arrow button to select a function on the left display box and copy to the right display box. This will add the function to the selected menu.</property>
</object>
</child>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes" context="menuassignpage|add">Add item</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin-bottom">10</property>
<property name="image">image3</property>
<property name="always-show-image">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="add-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="menuassignpage|extended_tip|add">Click on the right arrow button to select a function on the left display box and copy to the right display box. This will add the function to the selected menu.</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>
@ -804,32 +792,21 @@
</packing>
</child>
<child>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid">
<object class="GtkButton" id="remove">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes" context="menuassignpage|remove">Remove item</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="margin-top">5</property>
<child>
<object class="GtkButton" id="remove">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes" context="menuassignpage|remove">Remove item</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="margin-bottom">5</property>
<property name="image">image4</property>
<property name="always-show-image">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="remove-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="menuassignpage|extended_tip|remove">Click on the left arrow button to remove the selected command from the current menu.</property>
</object>
</child>
<property name="margin-bottom">5</property>
<property name="image">image4</property>
<property name="always-show-image">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="remove-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="menuassignpage|extended_tip|remove">Click on the left arrow button to remove the selected command from the current menu.</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
<packing>