wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
wxHeaderButtonParams* params = NULL);
+ virtual int GetHeaderButtonHeight(wxWindow *win);
+
+
// draw the expanded/collapsed icon for a tree control item
virtual void DrawTreeItemButton(wxWindow *win,
wxDC& dc,
{
GtkWidget *button = wxGTKPrivate::GetHeaderButtonWidget();
+ if (flags & wxCONTROL_SPECIAL)
+ button = wxGTKPrivate::GetHeaderButtonWidgetFirst();
+ if (flags & wxCONTROL_DIRTY)
+ button = wxGTKPrivate::GetHeaderButtonWidgetLast();
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
wxASSERT_MSG( gdk_window,
"button",
dc.LogicalToDeviceX(rect.x) - x_diff, rect.y, rect.width, rect.height
);
-
+
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
}
+int wxRendererGTK::GetHeaderButtonHeight(wxWindow *WXUNUSED(win))
+{
+ GtkWidget *button = wxGTKPrivate::GetHeaderButtonWidget();
+
+ GtkRequisition req;
+ GTK_WIDGET_GET_CLASS(button)->size_request(button, &req);
+
+ return req.height;
+}
+
+
// draw a ">" or "v" button
void
wxRendererGTK::DrawTreeItemButton(wxWindow* win,
const wxRect& rect,
int flags )
{
+ GtkWidget *tree = wxGTKPrivate::GetTreeWidget();
+
GdkWindow* gdk_window = wxGetGdkWindowForDC(win, dc);
wxASSERT_MSG( gdk_window,
wxT("cannot use wxRendererNative on wxDC of this type") );
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
x_diff = rect.width;
- GtkStateType state;
+ GtkStateType state = GTK_STATE_NORMAL;
+
if (flags & wxCONTROL_SELECTED)
{
// the wxCONTROL_FOCUSED state is deduced
// directly from the m_wxwindow by GTK+
state = GTK_STATE_SELECTED;
- gtk_paint_flat_box( win->m_widget->style,
+ gtk_paint_flat_box( tree->style, // win->m_widget->style,
gdk_window,
state,
GTK_SHADOW_NONE,
if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED))
{
- gtk_paint_focus( win->m_widget->style,
+ if (flags & wxCONTROL_SELECTED)
+ state = GTK_STATE_SELECTED;
+
+ gtk_paint_focus( tree->style,
gdk_window,
state,
NULL,
// Using "treeview-middle" would fix the warning, but the right
// edge of the focus rect is not getting erased properly either.
// Better to not specify this detail unless the drawing is fixed.
- NULL,
+ // RR: I added that to the Pizza widget class.
+ "treeview",
dc.LogicalToDeviceX(rect.x),
dc.LogicalToDeviceY(rect.y),
rect.width,