draw_scrollbar = function(state)
App.color(Border_color)
local r = state.right+15+Scrollbar_width/2
love.graphics.line(r, state.top, r, state.bottom)
love.graphics.line(r-5, state.top, r+5, state.top)
love.graphics.line(r-5, state.bottom, r+5, state.bottom)
local sbtop, sbbot = compute_scrollbar(state)
local topy = state.top + sbtop*(state.bottom - state.top)
local boty = state.top +sbbot*(state.bottom - state.top)
App.color{r=0.8, g=0.8, b=0.9}
love.graphics.rectangle('fill', state.right+15, topy+5, Scrollbar_width, math.max(boty-topy-10, 5), 5,5)
state.scrollbar_top = topy
state.scrollbar_bottom = boty
end