Kaydet (Commit) 9b10ef9f authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Revert the TOPBOTTOM border window type, this needs another approach.

This reverts commit 51fdf273.

In order to be able to draw the toolbars docked on the left or on the right
nicely and reliably, we have to avoid any border in the shell; instead, the
docking areas will draw the separating lines (when finished).

Change-Id: I74c18a7e471a66ac0a436c2bf01f5be016280d22
üst 2ba43bc1
...@@ -78,7 +78,6 @@ public: ...@@ -78,7 +78,6 @@ public:
Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ), Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
pFrame( p ) pFrame( p )
{ {
SetBorderStyle( WINDOW_BORDER_TOPBOTTOM );
p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER ); p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
} }
......
...@@ -43,8 +43,7 @@ class OutputDevice; ...@@ -43,8 +43,7 @@ class OutputDevice;
#define FRAME_DRAW_GROUP ((sal_uInt16)0x0003) #define FRAME_DRAW_GROUP ((sal_uInt16)0x0003)
#define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004) #define FRAME_DRAW_DOUBLEIN ((sal_uInt16)0x0004)
#define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005) #define FRAME_DRAW_DOUBLEOUT ((sal_uInt16)0x0005)
#define FRAME_DRAW_TOPBOTTOM ((sal_uInt16)0x0006) #define FRAME_DRAW_NWF ((sal_uInt16)0x0006)
#define FRAME_DRAW_NWF ((sal_uInt16)0x0007)
#define FRAME_DRAW_MENU ((sal_uInt16)0x0010) #define FRAME_DRAW_MENU ((sal_uInt16)0x0010)
#define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020) #define FRAME_DRAW_WINDOWBORDER ((sal_uInt16)0x0020)
#define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040) #define FRAME_DRAW_BORDERWINDOWBORDER ((sal_uInt16)0x0040)
......
...@@ -290,8 +290,7 @@ typedef sal_uInt16 StateChangedType; ...@@ -290,8 +290,7 @@ typedef sal_uInt16 StateChangedType;
#define WINDOW_BORDER_NORMAL ((sal_uInt16)0x0001) #define WINDOW_BORDER_NORMAL ((sal_uInt16)0x0001)
#define WINDOW_BORDER_MONO ((sal_uInt16)0x0002) #define WINDOW_BORDER_MONO ((sal_uInt16)0x0002)
#define WINDOW_BORDER_MENU ((sal_uInt16)0x0010) #define WINDOW_BORDER_MENU ((sal_uInt16)0x0010)
#define WINDOW_BORDER_TOPBOTTOM ((sal_uInt16)0x0020) #define WINDOW_BORDER_NWF ((sal_uInt16)0x0020)
#define WINDOW_BORDER_NWF ((sal_uInt16)0x0040)
#define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000) #define WINDOW_BORDER_NOBORDER ((sal_uInt16)0x1000)
#define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000) #define WINDOW_BORDER_REMOVEBORDER ((sal_uInt16)0x2000)
......
...@@ -1200,8 +1200,6 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei ...@@ -1200,8 +1200,6 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
// ist, dann Border nach aussen // ist, dann Border nach aussen
if ( mpBorderWindow->mbSmallOutBorder ) if ( mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT; nStyle |= FRAME_DRAW_DOUBLEOUT;
else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
nStyle |= FRAME_DRAW_TOPBOTTOM;
else if ( nBorderStyle & WINDOW_BORDER_NWF ) else if ( nBorderStyle & WINDOW_BORDER_NWF )
nStyle |= FRAME_DRAW_NWF; nStyle |= FRAME_DRAW_NWF;
else else
...@@ -1382,8 +1380,6 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* ...@@ -1382,8 +1380,6 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*
// ist, dann Border nach aussen // ist, dann Border nach aussen
if ( mpBorderWindow->mbSmallOutBorder ) if ( mpBorderWindow->mbSmallOutBorder )
nStyle |= FRAME_DRAW_DOUBLEOUT; nStyle |= FRAME_DRAW_DOUBLEOUT;
else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
nStyle |= FRAME_DRAW_TOPBOTTOM;
else if ( nBorderStyle & WINDOW_BORDER_NWF ) else if ( nBorderStyle & WINDOW_BORDER_NWF )
nStyle |= FRAME_DRAW_NWF; nStyle |= FRAME_DRAW_NWF;
else else
......
...@@ -736,11 +736,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, ...@@ -736,11 +736,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
rRect.Bottom() -= 2; rRect.Bottom() -= 2;
break; break;
case FRAME_DRAW_TOPBOTTOM:
++rRect.Top();
--rRect.Bottom();
break;
case FRAME_DRAW_NWF: case FRAME_DRAW_NWF:
// enough space for the native rendering // enough space for the native rendering
rRect.Left() += 4; rRect.Left() += 4;
...@@ -830,16 +825,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, ...@@ -830,16 +825,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
} }
break; 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;
case FRAME_DRAW_NWF: case FRAME_DRAW_NWF:
// no rendering, just enough space for the native rendering // no rendering, just enough space for the native rendering
rRect.Left() += 4; rRect.Left() += 4;
......
...@@ -1184,16 +1184,10 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ...@@ -1184,16 +1184,10 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
if( nStyle & FRAME_DRAW_NODRAW ) if( nStyle & FRAME_DRAW_NODRAW )
{ {
if( (nStyle & FRAME_DRAW_TOPBOTTOM) == FRAME_DRAW_TOPBOTTOM ) rNativeContentRegion = Rectangle(x1+frameWidth,
rNativeContentRegion = Rectangle(x1, y1+frameWidth,
y1+frameWidth, x2-frameWidth,
x2, y2-frameWidth);
y2-frameWidth);
else
rNativeContentRegion = Rectangle(x1+frameWidth,
y1+frameWidth,
x2-frameWidth,
y2-frameWidth);
} }
else else
rNativeContentRegion = rControlRegion; rNativeContentRegion = rControlRegion;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment