add preference ui and "allways on top" function
using offset