summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-11-24 17:39:38 +0900
committerTomaž Vajngerl <quikee@gmail.com>2017-11-24 14:51:17 +0100
commit12d12fa8fae469b01db68d23fa6ee2eb89a86d45 (patch)
tree2dd012d21cea99891121a0617abe6a78746d46ef /svx
parent0f2f6285f6cad32520999830a4c3d80135c56ac5 (diff)
TSCP: fix oversizing of ListBox-es by defining max lines & chars
Change-Id: I47e8018c5f2c0ea890b5a11ac7cc03fafb7d1eed Reviewed-on: https://gerrit.libreoffice.org/45205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx8
-rw-r--r--svx/source/dialog/ClassificationEditView.cxx2
-rw-r--r--svx/uiconfig/ui/classificationdialog.ui32
3 files changed, 25 insertions, 17 deletions
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index a7b1469100f5..aa7f2e778be9 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -194,16 +194,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
+ m_pClassificationListBox->setMaxWidthChars(20);
m_pClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maHelper.GetBACNames())
m_pClassificationListBox->InsertEntry(rName);
+ m_pInternationalClassificationListBox->setMaxWidthChars(20);
m_pInternationalClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maInternationalHelper.GetBACNames())
m_pInternationalClassificationListBox->InsertEntry(rName);
if (!maHelper.GetMarkings().empty())
{
+ m_pMarkingListBox->setMaxWidthChars(20);
m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl));
@@ -216,14 +219,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pMarkingLabel->Show(false);
}
+ m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
+ m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
+ m_pIntellectualPropertyPartListBox->SetDropDownLineCount(5);
+ m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyParts())
m_pIntellectualPropertyPartListBox->InsertEntry(rName);
+ m_pRecentlyUsedListBox->setMaxWidthChars(5);
m_pRecentlyUsedListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectRecentlyUsedHdl));
bool bExpand = officecfg::Office::Common::Classification::IntellectualPropertySectionExpanded::get();
diff --git a/svx/source/dialog/ClassificationEditView.cxx b/svx/source/dialog/ClassificationEditView.cxx
index 76b778303bc2..75eec4aa8329 100644
--- a/svx/source/dialog/ClassificationEditView.cxx
+++ b/svx/source/dialog/ClassificationEditView.cxx
@@ -49,7 +49,7 @@ ClassificationEditView::ClassificationEditView(vcl::Window* pParent, WinBits nBi
Color aBgColor = rStyleSettings.GetWindowColor();
float fScaleFactor = GetDPIScaleFactor();
- set_width_request(600 * fScaleFactor);
+ set_width_request(500 * fScaleFactor);
set_height_request(100 * fScaleFactor);
SetMapMode(MapMode(MapUnit::MapTwip));
diff --git a/svx/uiconfig/ui/classificationdialog.ui b/svx/uiconfig/ui/classificationdialog.ui
index 911363016f25..bfc3d78d8f7e 100644
--- a/svx/uiconfig/ui/classificationdialog.ui
+++ b/svx/uiconfig/ui/classificationdialog.ui
@@ -291,6 +291,7 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
@@ -305,26 +306,13 @@
</packing>
</child>
<child>
- <object class="GtkTreeView" id="intellectualPropertyPartLB">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection"/>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="intellectualPropertyPartAddButton">
<property name="label" translatable="yes" context="classificationdialog|intellectualPropertyPartAddButton">Add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -359,7 +347,19 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkTreeView" id="intellectualPropertyPartLB">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
</child>
<child>
<placeholder/>