diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-12-13 18:03:19 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-12-13 18:03:46 +0100 |
commit | 62a0a37bad348489222b0cbe8254977c369684a1 (patch) | |
tree | de37bd9586d094f885f3d44dd34a25c4475a192d /sfx2/source/control | |
parent | 59197dea293677b55a6f79a6bcfaaa7ce7c8f97b (diff) |
startcenter: The welcome text was too long, split it to 2 lines.
Change-Id: I23d6a4bf8d9c3b2531dd95e4ea293ce7225bf8f1
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/control/templateview.hrc | 5 | ||||
-rw-r--r-- | sfx2/source/control/templateview.src | 9 |
3 files changed, 26 insertions, 11 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index afadb045618e..1b63ba428268 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -46,7 +46,8 @@ RecentDocsView::RecentDocsView( Window* pParent ) , mnItemPadding(5) , mnItemMaxTextLength(30) , maWelcomeImage(SfxResId(IMG_WELCOME)) - , maWelcomeText(SfxResId(STR_WELCOME)) + , maWelcomeLine1(SfxResId(STR_WELCOME_LINE1)) + , maWelcomeLine2(SfxResId(STR_WELCOME_LINE2)) { SetStyle(GetStyle() | WB_VSCROLL); setItemMaxTextLength( mnItemMaxTextLength ); @@ -254,17 +255,25 @@ void RecentDocsView::Paint( const Rectangle &aRect ) aNewFont.SetHeight(20); SetFont(aNewFont); - long nTextWidth = GetTextWidth(maWelcomeText); long nTextHeight = GetTextHeight(); + + long nTextWidth1 = GetTextWidth(maWelcomeLine1); + long nTextWidth2 = GetTextWidth(maWelcomeLine2); + const Size & rImgSize = maWelcomeImage.GetSizePixel(); - const Size & rScreenSize = GetSizePixel(); - const int nX = (rScreenSize.Width() - rImgSize.Width())/2; - const int nY = (rScreenSize.Height() - nTextHeight*1.5 - rImgSize.Height())/2; + + const Size & rSize = GetSizePixel(); + + const int nX = (rSize.Width() - rImgSize.Width())/2; + const int nY = (rSize.Height() - 3 * nTextHeight - rImgSize.Height())/2; + Point aImgPoint(nX, nY); - Point aStrPoint((rScreenSize.Width() - nTextWidth)/2, nY + rImgSize.Height() + nTextHeight/2); + Point aStr1Point((rSize.Width() - nTextWidth1)/2, nY + rImgSize.Height() + nTextHeight/2); + Point aStr2Point((rSize.Width() - nTextWidth2)/2, nY + rImgSize.Height() + nTextHeight + nTextHeight/2); DrawImage(aImgPoint, rImgSize, maWelcomeImage, IMAGE_DRAW_SEMITRANSPARENT); - DrawText(aStrPoint, maWelcomeText); + DrawText(aStr1Point, maWelcomeLine1); + DrawText(aStr2Point, maWelcomeLine2); SetFont(aOldFont); } diff --git a/sfx2/source/control/templateview.hrc b/sfx2/source/control/templateview.hrc index f0c4daeb08b3..e5608c9fc786 100644 --- a/sfx2/source/control/templateview.hrc +++ b/sfx2/source/control/templateview.hrc @@ -10,7 +10,8 @@ #define BTN_ALL_TEMPLATES 256 #define CONTROL_BUTTONS 257 #define FT_NAME 258 -#define STR_WELCOME 259 -#define IMG_WELCOME 260 +#define STR_WELCOME_LINE1 259 +#define STR_WELCOME_LINE2 260 +#define IMG_WELCOME 261 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/control/templateview.src b/sfx2/source/control/templateview.src index 3b866bd2e85a..49fe01588d12 100644 --- a/sfx2/source/control/templateview.src +++ b/sfx2/source/control/templateview.src @@ -23,9 +23,14 @@ FixedText FT_NAME Size = MAP_APPFONT( 238, 12 ); }; -String STR_WELCOME +String STR_WELCOME_LINE1 { - Text [ en-US ] = "Welcome to %PRODUCTNAME. Use the sidebar to open or create a file."; + Text [ en-US ] = "Welcome to %PRODUCTNAME."; +}; + +String STR_WELCOME_LINE2 +{ + Text [ en-US ] = "Use the sidebar to open or create a file."; }; Image IMG_WELCOME |