In this patch (188 lines long with all context) I added callbacks for mode\rows changed events and modified the panel size computation routine for deskbar mode. I also tweaked flag\text drawing a little bit to scale it properly.