GollyGang / ready

A cross-platform implementation of various reaction-diffusion systems and PDEs.
GNU General Public License v3.0
766 stars 60 forks source link

Manually sized buttons causing problems on e.g. GTK3 #42

Closed timhutton closed 4 years ago

timhutton commented 4 years ago

In quite a few places we do, e.g. wxSize(30,wxDefaultCoord) to specify the size of a button in pixels (here just the width, leaving the height to be determined by the system).

On one particular platform (GTK3 on Ubuntu 19.10, below) this causes the text of some buttons to not be shown since the size is too small.

Given the need to allow the user to set the size of their screen elements for accessibility, it seems that we shouldn't be specifying the size manually at all but allowing the system to set them, with styles like wxBU_EXACTFIT if needed.

image (note that the +/- buttons in the Info and Help Panels don't have labels visible)

timhutton commented 4 years ago

Also spits out errors on the command line:

(ready:20249): Gtk-WARNING **: 00:41:42.001: Negative content width -4 (allocation 30, extents 17x17) while allocating gadget (node button, owner GtkButton)

(ready:20249): Gtk-WARNING **: 00:41:42.001: Negative content width -4 (allocation 30, extents 17x17) while allocating gadget (node button, owner GtkButton)

(ready:20249): Gtk-WARNING **: 00:41:42.001: Negative content width -4 (allocation 30, extents 17x17) while allocating gadget (node button, owner GtkButton)
timhutton commented 4 years ago

Now looking like this on Ubuntu 19.10 with GTK3: image (and no errors on the command line)

timhutton commented 4 years ago

Looks like this in MacOS: image

timhutton commented 4 years ago

And on Windows, just for completeness:

image