- fieldWidth = (int)(width/m_nFields);
- fieldPosition = i*fieldWidth;
- if ( i == n )
- break;
- }
- }
- else // no_same_width
- {
- int *tempwidth = new int[m_nFields];
- int temppos = 0;
- for (i = 0; i < m_nFields; i++)
- {
- if (m_statusWidths[i] > 0) tempwidth[i] = m_statusWidths[i];
- else tempwidth[i] = (width - sum_of_nonvar) / num_of_var;
+ const wxRect& rc = GetSizeGripRect();
+#ifdef __WXGTK3__
+ GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget);
+ GdkRectangle rect;
+ if (toplevel && (!gtk_window_get_resize_grip_area(GTK_WINDOW(toplevel), &rect) ||
+ rect.width == 0 || rect.height == 0))
+ {
+ GtkStyleContext* sc = gtk_widget_get_style_context(toplevel);
+ gtk_style_context_save(sc);
+ gtk_style_context_add_class(sc, GTK_STYLE_CLASS_GRIP);
+ GtkJunctionSides sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT;
+ if (GetLayoutDirection() == wxLayout_RightToLeft)
+ sides = GTK_JUNCTION_CORNER_BOTTOMLEFT;
+ gtk_style_context_set_junction_sides(sc, sides);
+ gtk_render_handle(sc,
+ static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext()),
+ rc.x, rc.y, rc.width, rc.height);
+ gtk_style_context_restore(sc);
+ }
+#else
+ GdkWindowEdge edge =
+ GetLayoutDirection() == wxLayout_RightToLeft ? GDK_WINDOW_EDGE_SOUTH_WEST :
+ GDK_WINDOW_EDGE_SOUTH_EAST;
+ gtk_paint_resize_grip(gtk_widget_get_style(m_widget),
+ GTKGetDrawingWindow(),
+ gtk_widget_get_state(m_widget),
+ NULL,
+ m_widget,
+ "statusbar",
+ edge,
+ rc.x, rc.y, rc.width, rc.height );
+#endif