A C++ rewrite attempt of the tint2 panel.