summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorRuslan Kabatsayev <b7.10110111@gmail.com>2012-06-07 03:54:43 +0400
committerAndras Timar <atimar@suse.com>2012-06-07 14:06:53 +0200
commit866599ab5ce091de56094d4d458e010ba56d22d0 (patch)
tree5bc06a3d1c8571b7778b2ebc25fd27cacda9a6fa /vcl/unx
parent7d0d52fb758249a7d6b8fc5e36c0e77354e5f5c3 (diff)
Implement native FixedLine render, add GTK support for it
Change-Id: I142cc8c48331aaed0d157b4b0f81e7c021005624
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 6ffbb8cb2e6c..2b5d3c8f8e33 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -635,6 +635,11 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar
if(nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA)
return true;
break;
+
+ case CTRL_FIXEDLINE:
+ if(nPart == PART_SEPARATOR_VERT || nPart == PART_SEPARATOR_HORZ)
+ return true;
+ break;
}
return false;
@@ -921,6 +926,10 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
{
returnVal = NWPaintGTKWindowBackground( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
}
+ else if( nType == CTRL_FIXEDLINE )
+ {
+ returnVal = NWPaintGTKFixedLine( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
+ }
if(nType==CTRL_FRAME)
{
@@ -1187,6 +1196,22 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
/************************************************************************
* Individual control drawing functions
************************************************************************/
+sal_Bool GtkSalGraphics::NWPaintGTKFixedLine(
+ GdkDrawable* gdkDrawable,
+ ControlType, ControlPart nPart,
+ const Rectangle& rControlRectangle,
+ const clipList&,
+ ControlState, const ImplControlValue&,
+ const OUString& )
+{
+ if(nPart == PART_SEPARATOR_HORZ)
+ gtk_paint_hline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"hseparator",rControlRectangle.Left(),rControlRectangle.Right(),rControlRectangle.Top());
+ else
+ gtk_paint_vline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"vseparator",rControlRectangle.Top(),rControlRectangle.Bottom(),rControlRectangle.Left());
+
+ return true;
+}
+
sal_Bool GtkSalGraphics::NWPaintGTKFrame(
GdkDrawable* gdkDrawable,
ControlType, ControlPart,