Adds function to calculate the arrow for the toolbars