Issue 1: Display of shadows
The theme that I usually use (Materia) makes heavy use of shadows to display buttons. It also displays the "active" button (the one that you trigger when pressing Enter) a little bit darker than all others. Both of these aspects can be seen from the following demo GUI that I created using a native API for GTK3 (PyGObject): When I try to recreate this GUI using wxWidgets, however, the shadows are not visible at all: Other themes that I tested (such as Adawita) did not suffer from this effect. However, this is probably because they just do not make use of shadows: This is the wxFrame code that I used to create the wxWidgets demo application:
Code: Select all
wxBoxSizer *BoxSizer = new wxBoxSizer(wxHORIZONTAL);
wxButton *LeftButton = new wxButton(this, -1, "Button #1");
wxButton *RightButton = new wxButton(this, -1, "Button #2");
BoxSizer->Add(LeftButton, 0, wxALL, 20);
BoxSizer->Add(RightButton, 0, (wxALL & ~wxLEFT), 20);
SetSizerAndFit(BoxSizer);
Issue 2: Mouse click event changes the focus
In the native application, clicking into the window itself, i.e., the gray background, does not alter the currently active button. In the wxWidgets application, however, clicking into the background will always activate the last button that I added (Button #2). However, this is not exactly what I want. I would prefer if the previously activated button would just continue to be active. Is there a way to achieve this?
Information on the platform
I am running Fedora with GNOME 3.38.3 (Wayland) and installed wxWidgets from the official repository. CMake configures the project as follows:
Code: Select all
-- The CXX compiler identification is GNU 10.2.1
-- Found wxWidgets: -pthread;;;-lwx_gtk3u_core-3.0;-lwx_baseu-3.0 (found version "3.0.5")