about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-10-16 22:53:26 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-10-16 22:57:46 -0700
commit4b3f3595266729a16a2a5bdb2a480576d332c14c (patch)
tree8776a614abf1d0621284c2fb4808bcf59d1f2ed8 /edit.lua
parentea4a8379fe577207509719af41491190035fc8fa (diff)
downloadview.love-4b3f3595266729a16a2a5bdb2a480576d332c14c.tar.gz
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().
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua2
1 files changed, 1 insertions, 1 deletions
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)