You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/09/25 21:14:41 UTC

svn commit: r1390060 - in /incubator/ooo/trunk/main/cui/source/dialogs: about.cxx about.src

Author: arielch
Date: Tue Sep 25 19:14:41 2012
New Revision: 1390060

URL: http://svn.apache.org/viewvc?rev=1390060&view=rev
Log:
About Dialog: ensure dialog size if images are missing

Modified:
    incubator/ooo/trunk/main/cui/source/dialogs/about.cxx
    incubator/ooo/trunk/main/cui/source/dialogs/about.src

Modified: incubator/ooo/trunk/main/cui/source/dialogs/about.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/dialogs/about.cxx?rev=1390060&r1=1390059&r2=1390060&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/dialogs/about.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/dialogs/about.cxx Tue Sep 25 19:14:41 2012
@@ -394,19 +394,19 @@ void AboutDialog::LayoutControls( Size& 
     Size aMainLogoSz = maMainLogo.GetSizePixel();
     Size aAppLogoSiz = maAppLogo.GetSizePixel();
 
-    long nLeftOffset = aMainLogoSz.Width();
-
     aDlgSize = GetOutputSizePixel();
+    long nCol1 = aMainLogoSz.Width();
+    long nCol2 = aAppLogoSiz.Width() ? aAppLogoSiz.Width() : aDlgSize.Width();
 
     Size a6Size      = maVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
     long nDlgMargin  = a6Size.Width() * 2;
     long nCtrlMargin = a6Size.Height() * 2;
-    long nTextWidth  = aAppLogoSiz.Width() - nDlgMargin;
+    long nTextWidth  = nCol2 - nDlgMargin;
     long nY          = aAppLogoSiz.Height() + a6Size.Height();
 
-    aDlgSize.Width() = nLeftOffset + a6Size.Width() + aAppLogoSiz.Width();
+    aDlgSize.Width() = nCol1 + a6Size.Width() + nCol2;
 
-    Point aPos( nLeftOffset + a6Size.Width(), nY );
+    Point aPos( nCol1 + a6Size.Width(), nY );
     Size aSize;
     // layout fixed text control
     lcl_layoutFixedText( maVersionText, aPos, aSize, nTextWidth );
@@ -432,7 +432,7 @@ void AboutDialog::LayoutControls( Size& 
 
     // logos position
     maMainLogoPos = Point( 0, nY / 2 - aMainLogoSz.Height() / 2 );
-    maAppLogoPos = Point( nLeftOffset + a6Size.Width(), 0 );
+    maAppLogoPos = Point( nCol1 + a6Size.Width(), 0 );
 
     // OK-Button-Position (at the bottom and centered)
     Size aOKSiz = maOKButton.GetSizePixel();

Modified: incubator/ooo/trunk/main/cui/source/dialogs/about.src
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/dialogs/about.src?rev=1390060&r1=1390059&r2=1390060&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/dialogs/about.src (original)
+++ incubator/ooo/trunk/main/cui/source/dialogs/about.src Tue Sep 25 19:14:41 2012
@@ -32,6 +32,7 @@ ModalDialog RID_DEFAULTABOUT
     OutputSize = TRUE ;
     Moveable = TRUE ;
     SVLook = TRUE ;
+    Size = MAP_APPFONT ( 200 , 150 ) ;
     Text [ en-US ] = "About %PRODUCTNAME" ;
     OKButton RID_CUI_ABOUT_BTN_OK
     {