layout statusbar control: Implemented design by Mirek M.

Change-Id: Icaef88ba850f40e2354e896f688d11abba31fd8a
This commit is contained in:
Jan Holesovsky
2012-05-22 18:47:55 +02:00
parent bc1fd830be
commit 03cb0e5c36
24 changed files with 14 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

View File

@@ -323,7 +323,7 @@ Image IMG_VIEWLAYOUT_AUTOMATIC
{
ImageBitmap = Bitmap
{
File = "twopages_11x25.png" ;
File = "twopages_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};
@@ -331,7 +331,7 @@ Image IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE
{
ImageBitmap = Bitmap
{
File = "twopages_a_11x25.png" ;
File = "twopages_a_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};
@@ -340,7 +340,7 @@ Image IMG_VIEWLAYOUT_BOOKMODE
{
ImageBitmap = Bitmap
{
File = "doublepage_11x23.png" ;
File = "doublepage_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};
@@ -348,7 +348,7 @@ Image IMG_VIEWLAYOUT_BOOKMODE_ACTIVE
{
ImageBitmap = Bitmap
{
File = "doublepage_a_11x23.png" ;
File = "doublepage_a_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};
@@ -357,7 +357,7 @@ Image IMG_VIEWLAYOUT_SINGLECOLUMN
{
ImageBitmap = Bitmap
{
File = "emptypage_11x15.png" ;
File = "emptypage_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};
@@ -365,7 +365,7 @@ Image IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE
{
ImageBitmap = Bitmap
{
File = "emptypage_a_11x15.png" ;
File = "emptypage_a_10x22.png" ;
};
MaskColor = IMAGE_MASK_COLOR;
};

View File

@@ -41,11 +41,11 @@
SFX_IMPL_STATUSBAR_CONTROL( SwViewLayoutControl, SvxViewLayoutItem );
const long nImageWidthSingle = 15;
const long nImageWidthAuto = 25;
const long nImageWidthBook = 23;
const long nImageWidthSum = 63;
const long nImageHeight = 11;
const long nImageWidthSingle = 22;
const long nImageWidthAuto = 22;
const long nImageWidthBook = 22;
const long nImageWidthSum = nImageWidthSingle + nImageWidthAuto + nImageWidthBook;
const long nImageHeight = 10;
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
@@ -111,12 +111,14 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
OutputDevice* pDev = rUsrEvt.GetDevice();
Rectangle aRect = rUsrEvt.GetRect();
const Rectangle aControlRect = getControlRect();
const bool bSingleColumn = 0 == mpImpl->mnState;
const bool bAutomatic = 1 == mpImpl->mnState;
const bool bBookMode = 2 == mpImpl->mnState;
const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
const long nYOffset = (aRect.GetHeight() - nImageHeight)/2;
const long nYOffset = (aControlRect.GetHeight() - nImageHeight)/2;
aRect.Left() = aRect.Left() + nXOffset;
aRect.Top() = aRect.Top() + nYOffset;