Update: setbuttonlayout function