[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
Andras Timar
timar at kemper.freedesktop.org
Sun Jul 8 11:30:35 PDT 2012
sc/source/ui/condformat/condformatdlg.cxx | 19 +++++++++++--------
sc/source/ui/src/condformatdlg.src | 10 +++++-----
2 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit 1259cee4111a6b8f66d8583166c2ff9f3fc4d80d
Author: Andras Timar <atimar at suse.com>
Date: Sun Jul 8 20:26:38 2012 +0200
fix a few layout problems in Conditional Formatting dialog
Absolute pixel coordinates should not be used, because
we work with font size dependent relative coordinates
all over the place. Layout on Linux was OK, but controls
were positioned partially outside the visible area on Windows.
Change-Id: Iee417f57135ada7ea9cb73726c56f96b3154e0b8
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 79a111d..9ba146d 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -320,12 +320,12 @@ void ScCondFrmtEntry::Init()
Point aPointCol = maLbColMiddle.GetPosPixel();
Point aPointEdDataBar = maEdDataBarMin.GetPosPixel();
Point aPointLbDataBar = maLbDataBarMaxType.GetPosPixel();
- const long nMovePos = 250;
+ const long nMovePos = maLbEntryTypeMiddle.GetSizePixel().Width() * 1.2;
aPointLb.X() += nMovePos;
aPointEd.X() += nMovePos;
aPointCol.X() += nMovePos;
- aPointEdDataBar.X() += 1.5*nMovePos;
- aPointLbDataBar.X() += 1.5*nMovePos;
+ aPointEdDataBar.X() += 2*nMovePos;
+ aPointLbDataBar.X() += 2*nMovePos;
maLbEntryTypeMiddle.SetPosPixel(aPointLb);
maEdMiddle.SetPosPixel(aPointEd);
maLbColMiddle.SetPosPixel(aPointCol);
@@ -444,6 +444,10 @@ void ScCondFrmtEntry::HideCondElements()
void ScCondFrmtEntry::SetCondType()
{
+ maEdVal1.SetSizePixel(maEdVal2.GetSizePixel());
+ Point aPoint(maLbCondType.GetPosPixel().X() + maLbCondType.GetSizePixel().Width() + LogicToPixel(Size(5,1), MapMode(MAP_APPFONT)).getWidth(),
+ maEdVal1.GetPosPixel().Y());
+ maEdVal1.SetPosPixel(aPoint);
maEdVal1.Show();
maEdVal2.Show();
maLbStyle.Show();
@@ -562,6 +566,10 @@ void ScCondFrmtEntry::SetFormulaType()
SwitchToType(FORMULA);
HideColorScaleElements();
HideDataBarElements();
+ maEdVal1.SetPosPixel(maLbCondType.GetPosPixel());
+ Size aSize(maEdVal2.GetPosPixel().X() + maEdVal2.GetSizePixel().Width() - maLbCondType.GetPosPixel().X(), maEdVal1.GetSizePixel().Height());
+ maEdVal1.SetPosPixel(maLbCondType.GetPosPixel());
+ maEdVal1.SetSizePixel(aSize);
maEdVal1.Show();
maEdVal2.Hide();
maLbCondType.Hide();
@@ -569,8 +577,6 @@ void ScCondFrmtEntry::SetFormulaType()
maFtCondition.Show();
maWdPreview.Show();
maFtStyle.Show();
- Size aSize(440, 30);
- maEdVal1.SetSizePixel(aSize);
}
void ScCondFrmtEntry::Select()
@@ -894,14 +900,11 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, ConditionTypeSelectHdl )
{
if(maLbCondType.GetSelectEntryPos() == 6 || maLbCondType.GetSelectEntryPos() == 7)
{
- maEdVal1.SetSizePixel(maEdVal2.GetSizePixel());
maEdVal2.Show();
}
else
{
maEdVal2.Hide();
- Size aSize(440, 30);
- maEdVal1.SetSizePixel(aSize);
}
return 0;
}
diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src
index ebf84f3..174da1f 100644
--- a/sc/source/ui/src/condformatdlg.src
+++ b/sc/source/ui/src/condformatdlg.src
@@ -108,7 +108,7 @@ Control RID_COND_ENTRY
ListBox LB_CELLIS_TYPE
{
Pos = MAP_APPFONT( 70, 15 );
- Size = MAP_APPFONT( 50, 40 );
+ Size = MAP_APPFONT( 80, 40 );
Border = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
@@ -133,14 +133,14 @@ Control RID_COND_ENTRY
};
Edit ED_VAL1
{
- Pos = MAP_APPFONT( 125, 15 );
- Size = MAP_APPFONT( 160, 12 );
+ Pos = MAP_APPFONT( 155, 15 );
+ Size = MAP_APPFONT( 50, 12 );
Border = TRUE;
};
Edit ED_VAL2
{
Pos = MAP_APPFONT( 210, 15 );
- Size = MAP_APPFONT( 75, 12 );
+ Size = MAP_APPFONT( 50, 12 );
Border = TRUE;
};
ListBox LB_STYLE
@@ -157,7 +157,7 @@ Control RID_COND_ENTRY
ListBox LB_COLOR_FORMAT
{
Pos = MAP_APPFONT( 70, 15 );
- Size = MAP_APPFONT( 60, 60);
+ Size = MAP_APPFONT( 80, 60);
Border = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
More information about the Libreoffice-commits
mailing list