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:
How the Drivers pane currently looks in GTK+3:
How the Drivers pane looks with this PR:
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.
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:
How the Drivers pane currently looks in GTK+3:
How the Drivers pane looks with this PR:
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.