summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-28 01:47:22 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-09-28 20:58:14 +0100
commit63a8964ac6d34bb097cc20c0adf984f6380c0b01 (patch)
treeed7f874229983e92d8a1878a8a35794efeb406c6
parent5ab85f826e741e30ef1791165e322dbcd32182d7 (diff)
fix change tracking options preview sizes
Change-Id: I39bf97cd84685132180694fc99bb3a298ec798ed
-rw-r--r--include/sfx2/dialoghelper.hxx2
-rw-r--r--sfx2/source/dialog/dialoghelper.cxx5
-rw-r--r--sw/source/ui/config/optpage.cxx18
-rw-r--r--sw/uiconfig/swriter/ui/optredlinepage.ui8
4 files changed, 31 insertions, 2 deletions
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx
index 5b09eb56b73c..a1a6dacf8ffe 100644
--- a/include/sfx2/dialoghelper.hxx
+++ b/include/sfx2/dialoghelper.hxx
@@ -36,6 +36,8 @@ Size SFX2_DLLPUBLIC getDrawListBoxOptimalSize(const Window *pReference);
Size SFX2_DLLPUBLIC getPreviewStripSize(const Window *pReference);
+Size SFX2_DLLPUBLIC getPreviewOptionsSize(const Window *pReference);
+
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper);
OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper);
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx
index cd805006de10..fb710dfe5dfb 100644
--- a/sfx2/source/dialog/dialoghelper.cxx
+++ b/sfx2/source/dialog/dialoghelper.cxx
@@ -72,6 +72,11 @@ Size SFX2_DLLPUBLIC getPreviewStripSize(const Window *pReference)
return pReference->LogicToPixel(Size(70 , 40), MapMode(MAP_APPFONT));
}
+Size SFX2_DLLPUBLIC getPreviewOptionsSize(const Window *pReference)
+{
+ return pReference->LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT));
+}
+
OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper)
{
Date aDate(22, 12, 2000);
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index a2a70306f4d2..a92ea298b8c4 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -49,6 +49,7 @@
#include <editeng/fontitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/svxenum.hxx>
+#include <sfx2/dialoghelper.hxx>
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
@@ -1492,7 +1493,7 @@ SwMarkPreview::SwMarkPreview( Window *pParent, WinBits nWinBits ) :
nMarkPos(0)
{
- m_aInitialSize = LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT));
+ m_aInitialSize = getPreviewOptionsSize(this);
InitColors();
SetMapMode(MAP_PIXEL);
}
@@ -1665,9 +1666,12 @@ namespace
SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
const SfxItemSet& rSet )
- : SfxTabPage(pParent, "OptRedLinePage", "modules/swriter/ui/optredlinepage.ui" , rSet)
+ : SfxTabPage(pParent, "OptRedLinePage",
+ "modules/swriter/ui/optredlinepage.ui" , rSet)
, sNone(SW_RESSTR(SW_STR_NONE))
{
+ Size aPreviewSize(getPreviewOptionsSize(this));
+
get(pInsertLB,"insert");
get(pInsertColorLB,"insertcolor");
get(pInsertedPreviewWN,"insertedpreview");
@@ -1684,6 +1688,16 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
get(pMarkColorLB,"markcolor");
get(pMarkPreviewWN,"markpreview");
+ pInsertedPreviewWN->set_height_request(aPreviewSize.Height());
+ pDeletedPreviewWN->set_height_request(aPreviewSize.Height());
+ pChangedPreviewWN->set_height_request(aPreviewSize.Height());
+ pMarkPreviewWN->set_height_request(aPreviewSize.Height());
+
+ pInsertedPreviewWN->set_width_request(aPreviewSize.Width());
+ pDeletedPreviewWN->set_width_request(aPreviewSize.Width());
+ pChangedPreviewWN->set_width_request(aPreviewSize.Width());
+ pMarkPreviewWN->set_width_request(aPreviewSize.Width());
+
sAuthor = get<Window>("byauthor")->GetText();
for (sal_uInt16 i = 0; i < pInsertLB->GetEntryCount(); ++i)
diff --git a/sw/uiconfig/swriter/ui/optredlinepage.ui b/sw/uiconfig/swriter/ui/optredlinepage.ui
index 9b9b671fe7c5..8e33253b049d 100644
--- a/sw/uiconfig/swriter/ui/optredlinepage.ui
+++ b/sw/uiconfig/swriter/ui/optredlinepage.ui
@@ -48,6 +48,7 @@
<object class="svtlo-ColorListBox" id="insertcolor">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -60,6 +61,7 @@
<object class="svtlo-ColorListBox" id="deletedcolor">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -72,6 +74,7 @@
<object class="GtkComboBox" id="changed">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -84,6 +87,7 @@
<object class="svtlo-ColorListBox" id="changedcolor">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -304,6 +308,7 @@
<object class="GtkComboBoxText" id="insert">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>
@@ -331,6 +336,7 @@
<object class="GtkComboBox" id="deleted">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -386,6 +392,7 @@
<object class="svtlo-ColorListBox" id="markcolor">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -443,6 +450,7 @@
<object class="GtkComboBoxText" id="markpos">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">center</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>