- // Shadow colours
-#if defined(__WIN95__)
- wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
- m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);
-
- wxColour hilightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
- m_hilightPen = wxPen(hilightColour, 1, wxSOLID);
-#elif defined(__WXPM__)
- m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID);
- m_hilightPen = wxPen("WHITE", 1, wxSOLID);
-
- wxColour vColour;
-
- vColour.Set(wxString("LIGHT GREY"));
- SetBackgroundColour(vColour);
- vColour.Set(wxString("BLACK"));
- SetForegroundColour(vColour);
- m_defaultStatusBarFont = *wxSMALL_FONT;
+#if defined(__WXPM__)
+ m_mediumShadowPen = wxPen(wxColour(127, 127, 127));
+ m_hilightPen = *wxWHITE_PEN;
+
+ SetBackgroundColour(*wxLIGHT_GREY);
+ SetForegroundColour(*wxBLACK);
+#else // !__WXPM__
+ m_mediumShadowPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
+ m_hilightPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT));
+#endif // __WXPM__/!__WXPM__
+}
+
+void wxStatusBarGeneric::SetMinHeight(int height)
+{
+ // check that this min height is not less than minimal height for the
+ // current font (min height is as calculated above in Create() except for border)
+ int minHeight = (int)((11*GetCharHeight())/10);
+
+ if ( height > minHeight )
+ SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height + 2*m_borderY);
+}
+
+wxRect wxStatusBarGeneric::GetSizeGripRect() const
+{
+ int width, height;
+ wxWindow::DoGetClientSize(&width, &height);
+
+ if (GetLayoutDirection() == wxLayout_RightToLeft)
+ return wxRect(2, 2, height-2, height-4);
+ else
+ return wxRect(width-height-2, 2, height-2, height-4);
+}
+
+// ----------------------------------------------------------------------------
+// wxStatusBarGeneric - event handlers
+// ----------------------------------------------------------------------------
+
+void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
+{
+ wxPaintDC dc(this);
+
+#ifdef __WXGTK20__
+ // Draw grip first
+ if ( ShowsSizeGrip() )
+ {
+ const wxRect& rc = GetSizeGripRect();
+#ifdef __WXGTK3__
+ GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget);
+ if (toplevel && !gtk_window_get_has_resize_grip(GTK_WINDOW(toplevel)))
+ {
+ 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);
+ }