[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara
caolanm at redhat.com
Tue Apr 28 07:01:51 PDT 2015
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit a31991c4188e91326941fbe510ce70129d1ccde8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 28 15:00:49 2015 +0100
gtk3: draw native tab activate/roll-over status
Change-Id: I37cfc2e2a02fe047150988abfe02cb953c6848f6
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 68b52bf..268fd2d 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -926,6 +926,11 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break;
}
break;
+ case CTRL_TAB_ITEM:
+ context = mpNoteBookStyle;
+ if (nState & ControlState::SELECTED)
+ flags = (GtkStateFlags) (flags | GTK_STATE_FLAG_ACTIVE);
+ break;
default:
return false;
}
@@ -936,8 +941,15 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
gtk_style_context_save(context);
gtk_style_context_set_state(context, flags);
+ if (nType == CTRL_TAB_ITEM)
+ {
+ gtk_style_context_add_region(mpNoteBookStyle, GTK_STYLE_REGION_TAB, GTK_REGION_EVEN);
+ gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOP);
+ }
if (styleClass)
+ {
gtk_style_context_add_class(context, styleClass);
+ }
switch(renderType)
{
@@ -947,9 +959,11 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
0, 0,
rControlRegion.GetWidth(), rControlRegion.GetHeight());
if (renderType == RENDER_BACKGROUND_AND_FRAME)
+ {
gtk_render_frame(context, cr,
0, 0,
rControlRegion.GetWidth(), rControlRegion.GetHeight());
+ }
break;
case RENDER_CHECK:
case RENDER_RADIO:
More information about the Libreoffice-commits
mailing list