UI improvement: more stable scrollbar movement

akkartik
Dec 3, 2023, 1:28 AM
EHKB76GODSP442LYG5Q4HDBA26RHWXFC4Y76ZJL2ERW3RJEBDT7QC

Dependencies

  • [2] 6DJMOJKE support event handlers
  • [3] RVJNNICY bugfix: autosave settings
  • [4] ZM7NOBRM new fork: carousel shell
  • [5] IP4LD33D mouse events for scrollbar
  • [6] Z5M23NTK implement second, 'output' editor

Change contents

  • replacement in 0036-adjust_scrollbar at line 2
    [4.525][4.525:577]()
    local s = (y-state.top) / (state.bottom-state.top)
    [4.525]
    [4.577]
    local s = (y-state.scrollbar_offset-state.top) / (state.bottom-state.top)
  • edit in 0017-on.mouse_release at line 17
    [2.546]
    [2.546]
    Current_pane.editor_state.scrollbar_offset = nil
  • edit in 0017-on.mouse_release at line 25
    [2.1024]
    [2.1024]
    Current_pane.output_editor_state.scrollbar_offset = nil
  • edit in 0016-on.mouse_press at line 26
    [2.1462]
    [2.1462]
    local sbtop = compute_scrollbar(Current_pane.editor_state)
    Current_pane.editor_state.scrollbar_offset = y - sbtop
  • edit in 0016-on.mouse_press at line 35
    [2.1893]
    [2.1893]
    local sbtop = compute_scrollbar(Current_pane.output_editor_state)
    Current_pane.output_editor_state.scrollbar_offset = y - sbtop
  • replacement in 0016-on.mouse_press at line 45
    [4.1606][3.173:177]()
    end
    [4.1606]
    end