summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-05-22 15:44:13 +0200
committerJan Holesovsky <kendy@suse.cz>2012-05-22 18:49:49 +0200
commit51fdf273e9893d3d05c99a09e1c2e5835a78e891 (patch)
tree6a62b880209a637e662b8efcfc4a78fdbdcba762
parent5394b379eba8f3522a80ee7e68708f8851a86d7d (diff)
border window: Design by Mirek M. - make the 'shells' more lightweight.
Just a line at the top and the bottom, we do not want the entire 3D effect here, it makes it visually incompatible with the window decorations. Change-Id: I262932fb5def21d5bc4fb347be6d6a07807bb4d2
-rw-r--r--sfx2/source/view/impviewframe.hxx1
-rw-r--r--vcl/inc/vcl/decoview.hxx1
-rw-r--r--vcl/inc/vcl/window.hxx1
-rw-r--r--vcl/source/window/brdwin.cxx4
-rw-r--r--vcl/source/window/decoview.cxx15
5 files changed, 22 insertions, 0 deletions
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 16fe88a346fd..9308894575e7 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -87,6 +87,7 @@ public:
bActive( sal_False ),
pFrame( p )
{
+ SetBorderStyle( WINDOW_BORDER_TOPBOTTOM );
p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
}
diff --git a/vcl/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index 64b738e66388..b6b6f0f09e94 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -52,6 +52,7 @@ class OutputDevice;
#define FRAME_DRAW_GROUP ((sal_uInt16)0x0003)
#define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004)
#define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005)
+#define FRAME_DRAW_TOPBOTTOM ((sal_uInt16)0x0006)
#define FRAME_DRAW_MENU ((sal_uInt16)0x0010)
#define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020)
#define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040)
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 94a3fbea738b..65118ca16520 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -292,6 +292,7 @@ typedef sal_uInt16 StateChangedType;
#define WINDOW_BORDER_ACTIVE ((sal_uInt16)0x0004)
#define WINDOW_BORDER_DOUBLEOUT ((sal_uInt16)0x0008)
#define WINDOW_BORDER_MENU ((sal_uInt16)0x0010)
+#define WINDOW_BORDER_TOPBOTTOM ((sal_uInt16)0x0020)
#define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000)
#define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000)
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 22dff3573389..9d397c2de7d7 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1199,6 +1199,8 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
// ist, dann Border nach aussen
if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT;
+ else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
+ nStyle |= FRAME_DRAW_TOPBOTTOM;
else
nStyle |= FRAME_DRAW_DOUBLEIN;
if ( nBorderStyle & WINDOW_BORDER_MONO )
@@ -1388,6 +1390,8 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*
// ist, dann Border nach aussen
if ( (nBorderStyle & WINDOW_BORDER_DOUBLEOUT) || mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT;
+ else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
+ nStyle |= FRAME_DRAW_TOPBOTTOM;
else
nStyle |= FRAME_DRAW_DOUBLEIN;
if ( nBorderStyle & WINDOW_BORDER_MONO )
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 6b6bc1a132f4..878578df7724 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -734,6 +734,11 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
rRect.Right() -= 2;
rRect.Bottom() -= 2;
break;
+
+ case FRAME_DRAW_TOPBOTTOM:
+ ++rRect.Top();
+ --rRect.Bottom();
+ break;
}
}
else
@@ -815,6 +820,16 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
rStyleSettings.GetShadowColor() );
}
break;
+
+ case FRAME_DRAW_TOPBOTTOM:
+ pDev->SetLineColor( rStyleSettings.GetShadowColor() );
+ pDev->DrawLine( Point( rRect.Left(), rRect.Top() ), Point( rRect.Right(), rRect.Top() ) );
+ pDev->DrawLine( Point( rRect.Left(), rRect.Bottom() ), Point( rRect.Right(), rRect.Bottom() ) );
+
+ // adjust target rectangle
+ ++rRect.Top();
+ --rRect.Bottom();
+ break;
}
}
}