improve appearance of themed borders
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -314,21 +314,25 @@ draw_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win)
|
|||||||
if (win->HasFlag(wxBORDER_RAISED))
|
if (win->HasFlag(wxBORDER_RAISED))
|
||||||
shadow = GTK_SHADOW_OUT;
|
shadow = GTK_SHADOW_OUT;
|
||||||
|
|
||||||
// Style detail to use
|
GtkStyle* style;
|
||||||
const char* detail;
|
const char* detail;
|
||||||
if (win->m_widget == win->m_wxwindow)
|
if (win->HasFlag(wxHSCROLL | wxVSCROLL))
|
||||||
// for non-scrollable wxWindows
|
{
|
||||||
detail = "entry";
|
style = gtk_widget_get_style(wxGTKPrivate::GetTreeWidget());
|
||||||
else
|
|
||||||
// for scrollable ones
|
|
||||||
detail = "viewport";
|
detail = "viewport";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
style = gtk_widget_get_style(wxGTKPrivate::GetEntryWidget());
|
||||||
|
detail = "entry";
|
||||||
|
}
|
||||||
|
|
||||||
// clip rect is required to avoid painting background
|
// clip rect is required to avoid painting background
|
||||||
// over upper left (w,h) of parent window
|
// over upper left (w,h) of parent window
|
||||||
GdkRectangle clipRect = { x, y, w, h };
|
GdkRectangle clipRect = { x, y, w, h };
|
||||||
gtk_paint_shadow(
|
gtk_paint_shadow(
|
||||||
gtk_widget_get_style(win->m_wxwindow), gdk_event->window, GTK_STATE_NORMAL,
|
style, gdk_event->window, GTK_STATE_NORMAL,
|
||||||
shadow, &clipRect, wxGTKPrivate::GetEntryWidget(), detail, x, y, w, h);
|
shadow, &clipRect, widget, detail, x, y, w, h);
|
||||||
#endif // !__WXGTK3__
|
#endif // !__WXGTK3__
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user