X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b04683b19e5cca2747f9ad565b42c5f1545838bc..917be7ed065337e8a7a67615969ecaade9eea809:/src/gtk1/button.cpp diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 435358d25f..5d6dda1190 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -127,13 +127,18 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, else if (HasFlag(wxBU_BOTTOM)) y_alignment = 1.0; -#if GTK_CHECK_VERSION(2,4,0) - gtk_button_set_alignment(GTK_BUTTON(m_widget), x_alignment, y_alignment); -#else - if (GTK_IS_MISC(BUTTON_CHILD(m_widget))) - gtk_misc_set_alignment (GTK_MISC (BUTTON_CHILD (m_widget)), - x_alignment, y_alignment); +#if __WXGTK24__ + if (!gtk_check_version(2,4,0)) + { + gtk_button_set_alignment(GTK_BUTTON(m_widget), x_alignment, y_alignment); + } + else #endif + { + if (GTK_IS_MISC(BUTTON_CHILD(m_widget))) + gtk_misc_set_alignment (GTK_MISC (BUTTON_CHILD (m_widget)), + x_alignment, y_alignment); + } SetLabel(label);