sc/source/ui/condformat/condformatdlg.cxx | 19 +++++++++++-------- sc/source/ui/src/condformatdlg.src | 10 +++++----- 2 files changed, 16 insertions(+), 13 deletions(-)
New commits: commit dd9a9e192e9e7a18f96d9ecff71ac6d5718920ac Author: Andras Timar <ati...@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 e303625..2ec2dc7 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 ] = _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits