Simplify GetDefaultAttributesFromGTKWidget() by passing the widget to use,
rather than a pointer to a function to create the widget git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,13 +18,6 @@ typedef struct _GtkEntry GtkEntry;
|
|||||||
// wxControl
|
// wxControl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// C-linkage function pointer types for GetDefaultAttributesFromGTKWidget
|
|
||||||
extern "C" {
|
|
||||||
typedef GtkWidget* (*wxGtkWidgetNew_t)(void);
|
|
||||||
typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const char*);
|
|
||||||
typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*);
|
|
||||||
}
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
|
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
|
||||||
{
|
{
|
||||||
typedef wxControlBase base_type;
|
typedef wxControlBase base_type;
|
||||||
@@ -80,19 +73,6 @@ protected:
|
|||||||
GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
||||||
bool useBase = false,
|
bool useBase = false,
|
||||||
int state = 0);
|
int state = 0);
|
||||||
static wxVisualAttributes
|
|
||||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t,
|
|
||||||
bool useBase = false,
|
|
||||||
int state = 0);
|
|
||||||
static wxVisualAttributes
|
|
||||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t,
|
|
||||||
bool useBase = false,
|
|
||||||
int state = 0);
|
|
||||||
|
|
||||||
static wxVisualAttributes
|
|
||||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t,
|
|
||||||
bool useBase = false,
|
|
||||||
int state = 0);
|
|
||||||
|
|
||||||
// Widgets that use the style->base colour for the BG colour should
|
// Widgets that use the style->base colour for the BG colour should
|
||||||
// override this and return true.
|
// override this and return true.
|
||||||
|
@@ -95,7 +95,7 @@ GdkWindow *wxAnyButton::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxAnyButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxAnyButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_button_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_button_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -334,7 +334,7 @@ wxSize wxButton::DoGetBestSize() const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_button_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_button_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_BUTTON
|
#endif // wxUSE_BUTTON
|
||||||
|
@@ -236,7 +236,7 @@ GdkWindow *wxCheckBox::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxCheckBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_check_button_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_check_button_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -393,7 +393,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style)
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -290,9 +290,9 @@ wxVisualAttributes
|
|||||||
wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new_with_entry, true);
|
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_new_with_entry(), true);
|
||||||
#else
|
#else
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new, true);
|
return GetDefaultAttributesFromGTKWidget(gtk_combo_box_entry_new(), true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -234,6 +234,14 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
|||||||
int state)
|
int state)
|
||||||
{
|
{
|
||||||
wxVisualAttributes attr;
|
wxVisualAttributes attr;
|
||||||
|
|
||||||
|
GtkWidget* tlw = NULL;
|
||||||
|
if (gtk_widget_get_parent(widget) == NULL)
|
||||||
|
{
|
||||||
|
tlw = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_container_add(GTK_CONTAINER(tlw), widget);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
GtkStateFlags stateFlag = GTK_STATE_FLAG_NORMAL;
|
GtkStateFlags stateFlag = GTK_STATE_FLAG_NORMAL;
|
||||||
if (state)
|
if (state)
|
||||||
@@ -258,29 +266,30 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
|||||||
if (!style)
|
if (!style)
|
||||||
style = gtk_widget_get_default_style();
|
style = gtk_widget_get_default_style();
|
||||||
|
|
||||||
if (!style)
|
if (style)
|
||||||
{
|
{
|
||||||
return wxWindow::GetClassDefaultAttributes(wxWINDOW_VARIANT_NORMAL);
|
// get the style's colours
|
||||||
}
|
attr.colFg = wxColour(style->fg[state]);
|
||||||
|
if (useBase)
|
||||||
|
attr.colBg = wxColour(style->base[state]);
|
||||||
|
else
|
||||||
|
attr.colBg = wxColour(style->bg[state]);
|
||||||
|
|
||||||
// get the style's colours
|
// get the style's font
|
||||||
attr.colFg = wxColour(style->fg[state]);
|
if (!style->font_desc)
|
||||||
if (useBase)
|
style = gtk_widget_get_default_style();
|
||||||
attr.colBg = wxColour(style->base[state]);
|
if (style && style->font_desc)
|
||||||
|
{
|
||||||
|
wxNativeFontInfo info;
|
||||||
|
info.description = style->font_desc;
|
||||||
|
attr.font = wxFont(info);
|
||||||
|
info.description = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
attr.colBg = wxColour(style->bg[state]);
|
attr = wxWindow::GetClassDefaultAttributes(wxWINDOW_VARIANT_NORMAL);
|
||||||
|
|
||||||
// get the style's font
|
|
||||||
if ( !style->font_desc )
|
|
||||||
style = gtk_widget_get_default_style();
|
|
||||||
if ( style && style->font_desc )
|
|
||||||
{
|
|
||||||
wxNativeFontInfo info;
|
|
||||||
info.description = style->font_desc;
|
|
||||||
attr.font = wxFont(info);
|
|
||||||
info.description = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!attr.font.IsOk())
|
if (!attr.font.IsOk())
|
||||||
{
|
{
|
||||||
GtkSettings *settings = gtk_settings_get_default();
|
GtkSettings *settings = gtk_settings_get_default();
|
||||||
@@ -296,56 +305,9 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
|||||||
g_free (font_name);
|
g_free (font_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return attr;
|
if (tlw)
|
||||||
}
|
gtk_widget_destroy(tlw);
|
||||||
|
|
||||||
|
|
||||||
//static
|
|
||||||
wxVisualAttributes
|
|
||||||
wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t widget_new,
|
|
||||||
bool useBase,
|
|
||||||
int state)
|
|
||||||
{
|
|
||||||
wxVisualAttributes attr;
|
|
||||||
// NB: we need toplevel window so that GTK+ can find the right style
|
|
||||||
GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
GtkWidget* widget = widget_new();
|
|
||||||
gtk_container_add(GTK_CONTAINER(wnd), widget);
|
|
||||||
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
|
|
||||||
gtk_widget_destroy(wnd);
|
|
||||||
return attr;
|
|
||||||
}
|
|
||||||
|
|
||||||
//static
|
|
||||||
wxVisualAttributes
|
|
||||||
wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t widget_new,
|
|
||||||
bool useBase,
|
|
||||||
int state)
|
|
||||||
{
|
|
||||||
wxVisualAttributes attr;
|
|
||||||
// NB: we need toplevel window so that GTK+ can find the right style
|
|
||||||
GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
GtkWidget* widget = widget_new("");
|
|
||||||
gtk_container_add(GTK_CONTAINER(wnd), widget);
|
|
||||||
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
|
|
||||||
gtk_widget_destroy(wnd);
|
|
||||||
return attr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//static
|
|
||||||
wxVisualAttributes
|
|
||||||
wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new,
|
|
||||||
bool useBase,
|
|
||||||
int state)
|
|
||||||
{
|
|
||||||
wxVisualAttributes attr;
|
|
||||||
// NB: we need toplevel window so that GTK+ can find the right style
|
|
||||||
GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
GtkWidget* widget = widget_new(NULL);
|
|
||||||
gtk_container_add(GTK_CONTAINER(wnd), widget);
|
|
||||||
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
|
|
||||||
gtk_widget_destroy(wnd);
|
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5104,7 +5104,7 @@ void wxDataViewCtrl::GtkEnableSelectionEvents()
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataViewCtrl::DoApplyWidgetStyle(GtkRcStyle *style)
|
void wxDataViewCtrl::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||||
|
@@ -128,7 +128,7 @@ wxVisualAttributes wxGauge::GetDefaultAttributes() const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxGauge::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxGauge::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_progress_bar_new,
|
return GetDefaultAttributesFromGTKWidget(gtk_progress_bar_new(),
|
||||||
false, GTK_STATE_ACTIVE);
|
false, GTK_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -931,7 +931,7 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new, true);
|
return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTBOX
|
#endif // wxUSE_LISTBOX
|
||||||
|
@@ -607,7 +607,7 @@ GdkWindow *wxNotebook::GTKGetWindow(wxArrayGdkWindows& windows) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxNotebook::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxNotebook::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_notebook_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_notebook_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -617,14 +617,7 @@ GdkWindow *wxRadioBox::GTKGetWindow(wxArrayGdkWindows& windows) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxRadioBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxRadioBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
wxVisualAttributes attr;
|
return GetDefaultAttributesFromGTKWidget(gtk_radio_button_new_with_label(NULL, ""));
|
||||||
// NB: we need toplevel window so that GTK+ can find the right style
|
|
||||||
GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
|
|
||||||
gtk_container_add(GTK_CONTAINER(wnd), widget);
|
|
||||||
attr = GetDefaultAttributesFromGTKWidget(widget);
|
|
||||||
gtk_widget_destroy(wnd);
|
|
||||||
return attr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxRadioBox::GetItemFromPoint(const wxPoint& point) const
|
int wxRadioBox::GetItemFromPoint(const wxPoint& point) const
|
||||||
|
@@ -181,14 +181,7 @@ wxRadioButton::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
wxVisualAttributes attr;
|
return GetDefaultAttributesFromGTKWidget(gtk_radio_button_new_with_label(NULL, ""));
|
||||||
// NB: we need toplevel window so that GTK+ can find the right style
|
|
||||||
GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
|
|
||||||
gtk_container_add(GTK_CONTAINER(wnd), widget);
|
|
||||||
attr = GetDefaultAttributesFromGTKWidget(widget);
|
|
||||||
gtk_widget_destroy(wnd);
|
|
||||||
return attr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -235,7 +235,7 @@ void wxScrollBar::SetRange(int range)
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxScrollBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxScrollBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new(NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_SCROLLBAR
|
#endif // wxUSE_SCROLLBAR
|
||||||
|
@@ -533,7 +533,7 @@ GdkWindow *wxSlider::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxSlider::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxSlider::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_vscale_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_vscale_new(NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_SLIDER
|
#endif // wxUSE_SLIDER
|
||||||
|
@@ -217,9 +217,7 @@ wxSize wxSpinButton::DoGetBestSize() const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxSpinButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxSpinButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
// TODO: overload to accept functions like gtk_spin_button_new?
|
return GetDefaultAttributesFromGTKWidget(gtk_spin_button_new_with_range(0, 100, 1));
|
||||||
// Until then use a similar type
|
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_button_new);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -376,9 +376,7 @@ wxSize wxSpinCtrlGTKBase::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxSpinCtrlGTKBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxSpinCtrlGTKBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
// TODO: overload to accept functions like gtk_spin_button_new?
|
return GetDefaultAttributesFromGTKWidget(gtk_spin_button_new_with_range(0, 100, 1), true);
|
||||||
// Until then use a similar type
|
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_entry_new, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -75,8 +75,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxStaticBitmap::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxStaticBitmap::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
// TODO: overload to allow using gtk_pixmap_new?
|
return GetDefaultAttributesFromGTKWidget(gtk_image_new());
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_label_new);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_STATBMP
|
#endif // wxUSE_STATBMP
|
||||||
|
@@ -152,7 +152,7 @@ void wxStaticBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_frame_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_frame_new(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -76,7 +76,7 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxStaticLine::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxStaticLine::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_vseparator_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_vseparator_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -248,7 +248,7 @@ void wxStaticText::DoSetLabel(const wxString& str)
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxStaticText::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxStaticText::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_label_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_label_new(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_STATTEXT
|
#endif // wxUSE_STATTEXT
|
||||||
|
@@ -2009,7 +2009,7 @@ bool wxTextCtrl::GTKProcessEvent(wxEvent& event) const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxTextCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxTextCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_entry_new, true);
|
return GetDefaultAttributesFromGTKWidget(gtk_entry_new(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TEXTCTRL
|
#endif // wxUSE_TEXTCTRL
|
||||||
|
@@ -235,7 +235,7 @@ wxSize wxToggleButton::DoGetBestSize() const
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxToggleButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxToggleButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_toggle_button_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_toggle_button_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TOGGLEBTN
|
#endif // wxUSE_TOGGLEBTN
|
||||||
|
@@ -763,7 +763,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxToolBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxToolBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(gtk_toolbar_new);
|
return GetDefaultAttributesFromGTKWidget(gtk_toolbar_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_TOOLBAR_NATIVE
|
#endif // wxUSE_TOOLBAR_NATIVE
|
||||||
|
@@ -1004,7 +1004,7 @@ void wxWebViewWebKit::FindClear()
|
|||||||
wxVisualAttributes
|
wxVisualAttributes
|
||||||
wxWebViewWebKit::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
wxWebViewWebKit::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
||||||
{
|
{
|
||||||
return GetDefaultAttributesFromGTKWidget(webkit_web_view_new);
|
return GetDefaultAttributesFromGTKWidget(webkit_web_view_new());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user