summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-09-13 12:08:14 +0300
committerMuhammet Kara <muhammet.kara@pardus.org.tr>2017-09-13 13:04:17 +0200
commit6f60cfe259277e45f858ba5cbf39750217cb0953 (patch)
tree65d270e83aea2839fc17282a97da7ae4c2bd2b62 /cui
parent53548b8d74a34aa30b36b44f6e41f5949da9681d (diff)
tdf#112133: Drop the Add and Remove labels
and ensure consistent height of the controls in the first row of the Customize dialog. Change-Id: I6c2d75b647cad7a2ead8c875afc4fd38a182eef0 Reviewed-on: https://gerrit.libreoffice.org/42233 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/SvxMenuConfigPage.cxx9
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/uiconfig/ui/menuassignpage.ui50
3 files changed, 28 insertions, 33 deletions
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx
index 6d02d8d4442d..481723867af5 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -150,6 +150,15 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe
if ( !bIsMenuBar )
{
// Context menus cannot be added/removed
+ // These height requests are needed to keep the height of
+ // the top level list boxes consistent for all tabs
+ m_pTopLevelListBox->set_height_request(
+ m_pPlusBtn->GetOptimalSize().Height() );
+ m_pCommandCategoryListBox->set_height_request(
+ m_pPlusBtn->GetOptimalSize().Height() );
+
+ m_pPlusBtn->Disable();
+ m_pMinusBtn->Disable();
m_pPlusBtn->Hide();
m_pMinusBtn->Hide();
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index fa415d43f6f7..8626ddf68ba8 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1175,7 +1175,7 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
//TODO: Add SvxMenuEntriesListBox into the glade catalog, and use it on the
// .ui file to get rid of the extra VCLContainer, and all these manual
// sizing and widget creation tricks.
- m_pFunctions->set_width_request(aSize.Width() * 1.4);
+ m_pFunctions->set_width_request(aSize.Width() * 1.45);
// Make the middle buttons bigger
m_pAddCommandButton->set_height_request( m_pAddCommandButton->GetOptimalSize().Height() * 1.5 );
diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui
index 9b1da649f7d6..44b85edc2b86 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -164,6 +164,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkGrid">
@@ -175,6 +177,7 @@
<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>
@@ -188,22 +191,6 @@
<property name="top_attach">0</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="addlabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|addlabel">_Add</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">add</property>
- <accessibility>
- <relation type="label-for" target="add"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -220,6 +207,7 @@
<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>
@@ -233,22 +221,6 @@
<property name="top_attach">0</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="removelabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="menuassignpage|removelabel">Remo_ve</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">remove</property>
- <accessibility>
- <relation type="label-for" target="remove"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -527,6 +499,20 @@
<widget name="searchEntry"/>
</widgets>
</object>
+ <object class="GtkSizeGroup" id="sizegrp2">
+ <property name="mode">vertical</property>
+ <widgets>
+ <widget name="searchEntry"/>
+ <widget name="searchlabel"/>
+ <widget name="savein"/>
+ <widget name="functionbtn"/>
+ <widget name="categorylabel"/>
+ <widget name="commandcategorylist"/>
+ <widget name="toplevellist"/>
+ <widget name="plusbtn"/>
+ <widget name="minusbtn"/>
+ </widgets>
+ </object>
<object class="GtkMenu" id="insertmenu">
<property name="visible">True</property>
<property name="can_focus">False</property>