Adds border to gradient bitmaps in preset library panel.

A few other minor coding technique changes in the same area.