KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 348 forks source link

Make LabeledProgressBar work on Mono #4255

Closed HebaruSan closed 1 week ago

HebaruSan commented 1 week ago

Problem

The new LabeledProgressBars from #4249 don't display correctly on Mono; the underlying progress bar graphic is never rendered, and changing the text doesn't erase previous iterations of it, so they end up all piled up on top of one another over a plain background. It's unreadable and unusable.

Cause

The strategy of adding a Label to ProgressBar.Controls was appealing because it allowed us to let text rendering be handled by code that's already an expert in it, but turning a Label transparent seems to rely too heavily on quirks of the specific Win32 graphics subsystems. Mono just does things a bit differently.

Changes