[Libreoffice-commits] .: Branch 'libreoffice-3-5' - desktop/source

Andras Timar timar at kemper.freedesktop.org
Tue Feb 14 10:03:30 PST 2012


 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   34 ++++++++++++++++-------
 1 file changed, 25 insertions(+), 9 deletions(-)

New commits:
commit ef95aa6facbefaa49a8c9b3b6bb2a88b0fb3df83
Author: Tomcsik Bence <tomcsikbence at gmail.com>
Date:   Tue Feb 14 18:25:47 2012 +0100

    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 at suse.com>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 7199aaf..de324ef 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 );


More information about the Libreoffice-commits mailing list