bsnes-emu / bsnes

bsnes is a Super Nintendo (SNES) emulator focused on performance, features, and ease of use.
Other
1.67k stars 154 forks source link

hiro: Disable padding for the GTK+3 backend. #171

Closed Screwtapello closed 3 years ago

Screwtapello commented 3 years ago

GTK+3 is designed for automatic layout, where widgets are automatically sized and positioned according to the size of their contents. However, hiro has to be compatible with Windows, which lacks an automatic layout system, so hiro apps tend to position widgets manually.

Unfortunately, the GTK+3 default theme uses much bigger widgets than GTK+2 or Windows, so hiro apps using the GTK+3 backend tend to have ugly, overlapping widgets. To make GTK+3 behave more like other hiro targets, we add custom CSS and override the default theme at runtime.

Fixes #168.

Comparison

How the Drivers pane currently looks in GTK+2:

The bsnes Drivers pane, all nicely aligned

How the Drivers pane currently looks in GTK+3:

The bsnes Drivers pane, all blobby and overlapping

How the Drivers pane looks with this PR:

The bsnes Drivers pane, looking much better

Todo

There's a status-bar at the bottom of the Settings window whose top overlaps the bottom of the pane list, and the bottom widgets of each pane. Unfortunately, they sometimes have some Z-fighting and I'm not sure why. I can't see any CSS that would force the status bar to be tall either. Maybe we can figure that out later, though - this is already a nice improvement over the current state of the GTK+3 build.