From 4b3f3595266729a16a2a5bdb2a480576d332c14c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 16 Oct 2023 22:53:26 -0700 Subject: clearer API for drawing a button Make it more obvious that the color passed in is just for the background. The icon will do the rest. r/g/b keys are more consistent with App.color(). --- edit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'edit.lua') diff --git a/edit.lua b/edit.lua index 7d3c26f..232d9b9 100644 --- a/edit.lua +++ b/edit.lua @@ -183,7 +183,7 @@ function edit.draw(State) end if line.data == '' then -- button to insert new drawing - button(State, 'draw', {x=State.left-Margin_left+4, y=y+4, w=12,h=12, color={1,1,0}, + button(State, 'draw', {x=State.left-Margin_left+4, y=y+4, w=12,h=12, bg={r=1,g=1,b=0}, icon = icon.insert_drawing, onpress1 = function() Drawing.before = snapshot(State, line_index-1, line_index) -- cgit 1.4.1-2-gfad0