[Libreoffice-commits] .: 3 commits - cui/source xmlsecurity/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Jun 30 03:36:41 PDT 2011
cui/source/dialogs/about.cxx | 36 +++++++++++++----------
xmlsecurity/source/dialogs/certificateviewer.cxx | 9 -----
2 files changed, 21 insertions(+), 24 deletions(-)
New commits:
commit 76f0d09185da6dc9cccc6983cdced4478588a9e8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 11:30:44 2011 +0100
better sizing of copyright-text
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 94b359d..9dc0312 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -207,10 +207,9 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// Multiline edit with Copyright-Text
// preferred Version widget size
- Size aCTSize = aCopyrightText.GetSizePixel();
- aCTSize.Width() = nTextWidth;
- aCopyrightText.SetSizePixel(aCTSize);
- aCTSize = aCopyrightText.CalcMinimumSize();
+ aCopyrightText.SetSizePixel(Size(nTextWidth,600));
+ Size aCTSize = aCopyrightText.CalcMinimumSize();
+ aCTSize.Width()= nTextWidth;
Point aCTPnt;
aCTPnt.X() = ( aOutSiz.Width() - aCTSize.Width() ) / 2;
aCTPnt.Y() = nY;
commit d827b879432833e7de7aa8767af8238a8a1d9f82
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 10:41:47 2011 +0100
callcatcher: unused AdjustPosAndSize
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index e39540e..3bc33bc 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -53,19 +53,10 @@ namespace css = ::com::sun::star;
namespace
{
- void ShrinkToFit( FixedImage& _rImage );
- void AdjustPosAndSize( Control& _rCtrl, Point& _rStartIn_EndOut, long _nXOffset = 0 );
-
void ShrinkToFit( FixedImage& _rImg )
{
_rImg.SetSizePixel( _rImg.GetImage().GetSizePixel() );
}
-
- void AdjustPosAndSize( Control& _rCtrl, Point& _rStartIn_EndOut, long _nOffs )
- {
- _rCtrl.SetPosPixel( _rStartIn_EndOut );
- _rStartIn_EndOut.X() += XmlSec::ShrinkToFitWidth( _rCtrl, _nOffs );
- }
}
CertificateViewer::CertificateViewer(
commit 4f40b0f6f9a500f2da83f5cf862d531927556304
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 30 08:52:39 2011 +0100
center a long build string, and align normally a short one
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 8ef7a32..94b359d 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -78,11 +78,10 @@ GetBuildId()
{
rtl::OUString sDefault;
rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
- //strip trailing - from ./g log
- if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-')
+ if (!sBuildId.isEmpty() && sBuildId.getLength() > 50)
{
- sBuildId = sBuildId.copy(0, sBuildId.getLength()-1);
rtl::OUStringBuffer aBuffer;
+ aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t"));
sal_Int32 nIndex = 0;
do
{
@@ -95,7 +94,7 @@ GetBuildId()
if (nIndex % 5)
aBuffer.append(static_cast<sal_Unicode>('-'));
else
- aBuffer.append(static_cast<sal_Unicode>('\n'));
+ aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t"));
}
}
}
@@ -171,19 +170,27 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
- if (aAppLogoSiz.Width() < 300)
- aAppLogoSiz.Width() = 300;
-
- Size aOutSiz = GetOutputSizePixel();
- aOutSiz.Width() = aAppLogoSiz.Width();
-
// analyze size of the aVersionText widget
// character size
Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
// preferred Version widget size
long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
- long nDlgMargin = a6Size.Width() * 3 ;
+ long nDlgMargin = a6Size.Width() * 2;
long nCtrlMargin = a6Size.Height() * 2;
+
+ aVersionText.SetSizePixel(Size(800,600));
+ Size aVersionTextSize = aVersionText.CalcMinimumSize();
+ aVersionTextSize.Width() += nDlgMargin;
+
+ Size aOutSiz = GetOutputSizePixel();
+ aOutSiz.Width() = aAppLogoSiz.Width();
+
+ if (aOutSiz.Width() < aVersionTextSize.Width())
+ aOutSiz.Width() = aVersionTextSize.Width();
+
+ if (aOutSiz.Width() < 300)
+ aOutSiz.Width() = 300;
+
long nTextWidth = aOutSiz.Width() - nDlgMargin;
// finally set the aVersionText widget position and size
More information about the Libreoffice-commits
mailing list