Tip: Fix Linux Button Sizes
By Thom McGrath on
This really bugs me about Linux, at least on Ubuntu. Button sizes are typically 30 pixels tall, as opposed to the 20 pixels on Mac and Windows. So when you're creating your UI and plan to deploy to Linux as well, be aware of this. If your button sizes are 20 pixels tall - the REALbasic default - your buttons will look terrible on Linux, only showing the top half of the caption.
My solution? A subclass of PushButton I call RespectfulPushButton. In it's Open event, I simply make the height 10 pixels taller and move it up by 5 pixels. The result won't harm the UI much, and the buttons look perfect on Linux. You'll then want to define a new Open event, and trigger it from the Open event of the subclass. Of course, use conditional compiles to only resize the buttons on Linux. I then just use this subclass instead. Minimal work to setup, but you'll then need to get into the habit of using the subclass instead when placing new buttons.
PopupMenus have this pain as well. I have not seen this on any other controls, but I most write my own anyway.