gtk3: distinguish between first, last and only tabs
Change-Id: Ic69b84a3dd94ee25d5e660da152b1e776fa2b38e
This commit is contained in:
@@ -956,7 +956,18 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
|
|||||||
gtk_style_context_set_state(context, flags);
|
gtk_style_context_set_state(context, flags);
|
||||||
if (nType == CTRL_TAB_ITEM)
|
if (nType == CTRL_TAB_ITEM)
|
||||||
{
|
{
|
||||||
gtk_style_context_add_region(mpNoteBookStyle, GTK_STYLE_REGION_TAB, GTK_REGION_EVEN);
|
|
||||||
|
const TabitemValue& rTabitemValue = static_cast<const TabitemValue&>(aValue);
|
||||||
|
|
||||||
|
GtkRegionFlags eFlags(GTK_REGION_EVEN);
|
||||||
|
if (rTabitemValue.isFirst() && rTabitemValue.isLast())
|
||||||
|
eFlags = GTK_REGION_ONLY;
|
||||||
|
else if (rTabitemValue.isFirst())
|
||||||
|
eFlags = GTK_REGION_FIRST;
|
||||||
|
else if (rTabitemValue.isLast())
|
||||||
|
eFlags = GTK_REGION_LAST;
|
||||||
|
|
||||||
|
gtk_style_context_add_region(mpNoteBookStyle, GTK_STYLE_REGION_TAB, eFlags);
|
||||||
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOP);
|
gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOP);
|
||||||
}
|
}
|
||||||
if (styleClass)
|
if (styleClass)
|
||||||
|
Reference in New Issue
Block a user