about summary refs log tree commit diff stats
path: root/source_edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-09-14 22:27:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-09-14 22:27:38 -0700
commit1fd30c0462faf598d5ef7b2911379bc19a649253 (patch)
tree4c275e5efc0e99efddef0e3b556b2535bc534d99 /source_edit.lua
parent706296388809984b20b32edf3fa8f576c85508c5 (diff)
downloadtext.love-1fd30c0462faf598d5ef7b2911379bc19a649253.tar.gz
always show line numbers in source editor
The drawing buttons are now absolutely positioned, which is a horrible
hack. But for just the source editor it seems good enough. The
alternative is to modify magic constants in all the tests :/
Diffstat (limited to 'source_edit.lua')
-rw-r--r--source_edit.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/source_edit.lua b/source_edit.lua
index 96bfb12..78c7f4d 100644
--- a/source_edit.lua
+++ b/source_edit.lua
@@ -7,6 +7,7 @@ Current_stroke_color = {r=0.7, g=0.7, b=0.7}  -- in process of being drawn
 Current_name_background_color = {r=1, g=0, b=0, a=0.1}  -- name currently being edited
 Focus_stroke_color = {r=1, g=0, b=0}  -- what mouse is hovering over
 Highlight_color = {r=0.7, g=0.7, b=0.9}  -- selected text
+Line_number_color = {r=0.6, g=0.6, b=0.6}
 Icon_color = {r=0.7, g=0.7, b=0.7}  -- color of current mode icon in drawings
 Help_color = {r=0, g=0.5, b=0}
 Help_background_color = {r=0, g=0.5, b=0, a=0.1}
@@ -168,7 +169,7 @@ function edit.draw(State, hide_cursor)
       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=4, y=y+4, w=12,h=12, color={1,1,0},
           icon = icon.insert_drawing,
           onpress1 = function()
                        Drawing.before = snapshot(State, line_index-1, line_index)