summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomcsik Bence <tomcsikbence@gmail.com>2012-02-14 18:25:47 +0100
committerAndras Timar <atimar@suse.com>2012-02-14 19:03:20 +0100
commitef95aa6facbefaa49a8c9b3b6bb2a88b0fb3df83 (patch)
tree519577866c3d4ad305424359095a5c718aa396b0
parent0a28ddf2084f86743e229667ae2c9b7e4f95e49e (diff)
fix layout of checkboxes on Extension Manager dialog fdo#45851
I changed the sizes and the positions of the checkboxes. So there won't be truncated checkboxes in any languages. Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx34
1 files changed, 25 insertions, 9 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 7199aaf68789..de324eff140d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1244,16 +1244,32 @@ void ExtMgrDialog::Resize()
// checkboxes + text "type of extensions"
- Size aCBSize(m_aBundledCbx.GetSizePixel());
-
- offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT - 3*(aCBSize.Width() + RSC_SP_CTRL_GROUP_X) );
+ long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() );
+ Size aBCBSize(m_aBundledCbx.GetSizePixel());
+ aBCBSize.Width() = nWidth + 30;
+ aBCBSize.Height() += 3;
+ m_aBundledCbx.SetSizePixel( aBCBSize );
+
+ nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() );
+ Size aSCBSize(m_aSharedCbx.GetSizePixel());
+ aSCBSize.Width() = nWidth + 30;
+ aSCBSize.Height() += 3;
+ m_aSharedCbx.SetSizePixel( aSCBSize );
+
+ nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() );
+ Size aUCBSize(m_aUserCbx.GetSizePixel());
+ aUCBSize.Width() = nWidth + 30;
+ aUCBSize.Height() += 3;
+ m_aUserCbx.SetSizePixel( aUCBSize );
+
+ offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - aSCBSize.Width() - aUCBSize.Width() );
aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
- m_aBundledCbx.SetPosSizePixel(aPos, aCBSize);
- aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
- m_aSharedCbx.SetPosSizePixel(aPos, aCBSize);
- aPos.X() = aPos.X() + aCBSize.Width() + 2 * RSC_SP_CTRL_GROUP_X;
- m_aUserCbx.SetPosSizePixel(aPos, aCBSize);
+ m_aBundledCbx.SetPosPixel( aPos );
+ aPos.X() += aBCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+ m_aSharedCbx.SetPosPixel( aPos );
+ aPos.X() += aSCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X;
+ m_aUserCbx.SetPosPixel( aPos );
Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel());
aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM);
@@ -1269,7 +1285,7 @@ void ExtMgrDialog::Resize()
Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT,
aTotalSize.Height() - aBtnSize.Height() - LINE_SIZE - aBtnSize.Height()
- - aCBSize.Height() - aFTTypeOfExtSize.Height()
+ - aBCBSize.Height() - aFTTypeOfExtSize.Height()
- RSC_SP_DLG_INNERBORDER_TOP - 5*RSC_SP_DLG_INNERBORDER_BOTTOM );
m_pExtensionBox->SetSizePixel(aSize );