Fix setting wxBU_EXACTFIT style for wxButton under wxGTK2
The way wxBU_EXACTFIT is implemented in commit c1bb80987f
("Improve implementation of wxBU_EXACTFIT style for wxButton under wxGTK2",
2020-04-12) is too intrusive and disrupts button's appearance in some
themes. It should work better with themes if we reduce inner border in
a more GTK-compliant way by applying a dedicated GTK style to the button.
Closes #19081.
This commit is contained in:
@@ -67,6 +67,12 @@ private:
|
||||
// Return the GtkLabel used by this button.
|
||||
GtkLabel *GTKGetLabel() const;
|
||||
|
||||
#ifndef __WXGTK3__
|
||||
// To mark if special GTK style for buttons with wxBU_EXACTFIT flag
|
||||
// was already defined.
|
||||
static bool m_exactFitStyleDefined;
|
||||
#endif // !__WXGTK3__
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxButton);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user