Kaydet (Commit) 7b52e6b9 authored tarafından Ruslan Kabatsayev's avatar Ruslan Kabatsayev Kaydeden (comit) Michael Meeks

GTK theming: implement rendering window background

Change-Id: I34c6c38f383fce54aa0b2a61a5e88ee9a8cff4e7
üst 71056d59
...@@ -165,6 +165,11 @@ protected: ...@@ -165,6 +165,11 @@ protected:
GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect ); GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect );
sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ); sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect );
sal_Bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
const OUString& rCaption );
sal_Bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, sal_Bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle, const Rectangle& rControlRectangle,
const clipList& rClipList, const clipList& rClipList,
......
...@@ -614,7 +614,8 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar ...@@ -614,7 +614,8 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar
( (nPart == PART_TRACK_HORZ_AREA) ( (nPart == PART_TRACK_HORZ_AREA)
|| (nPart == PART_TRACK_VERT_AREA) || (nPart == PART_TRACK_VERT_AREA)
) )
) ) ||
(nType == CTRL_WINDOW_BACKGROUND)
) )
return( sal_True ); return( sal_True );
return( sal_False ); return( sal_False );
...@@ -898,6 +899,10 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ...@@ -898,6 +899,10 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
{ {
returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption ); returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
} }
else if( nType == CTRL_WINDOW_BACKGROUND )
{
returnVal = NWPaintGTKWindowBackground( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
if( pixmap ) if( pixmap )
{ {
...@@ -1132,6 +1137,29 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ...@@ -1132,6 +1137,29 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
/************************************************************************ /************************************************************************
* Individual control drawing functions * Individual control drawing functions
************************************************************************/ ************************************************************************/
sal_Bool GtkSalGraphics::NWPaintGTKWindowBackground(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
ControlState nState, const ImplControlValue&,
const OUString& )
{
int w,h;
gtk_window_get_size(GTK_WINDOW(m_pWindow),&w,&h);
GdkRectangle clipRect;
for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
{
clipRect.x = it->Left();
clipRect.y = it->Top();
clipRect.width = it->GetWidth();
clipRect.height = it->GetHeight();
gtk_paint_flat_box(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,GTK_SHADOW_NONE,&clipRect,m_pWindow,"base",0,0,w,h);
}
return sal_True;
}
sal_Bool GtkSalGraphics::NWPaintGTKButtonReal( sal_Bool GtkSalGraphics::NWPaintGTKButtonReal(
GtkWidget* button, GtkWidget* button,
......
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