Slightly better way of dynamically drawing side panel border