Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Experiment: Let wx.ScrolledView handle scrolling to enable horizontal scrolling #72

Closed
wants to merge 3 commits into from

Commits on Oct 1, 2023

  1. Configuration menu
    Copy the full SHA
    3423975 View commit details
    Browse the repository at this point in the history
  2. Enable horizontal scrolling

    By putting the Control into a ScrolledWindow, we get scroll bars whenever the Control's container is smaller than its minimum size.
    
    Vertical scrolling of the ScrolledWindow currently is deactivated, as we still have our custom implementation for vertical scrolling.
    
    This, however, raises some issues: At first, the vertical scroll bar gets scrolled away along with the Screenplay Control while scrolling horizontally, as it is part of the contents of the ScrolledWindow.
    
    Also, the hand-made scrollbar lacks some features, such as auto-hiding or the "precise scrolling mode" on Gtk.
    
    Eventually, the custom scrolling implementation is probably going to get in our way when implementing  limburgher#20 anyway, so we should try to port vertical scrolling to the ScrolledWindow scrolling mechanism.
    janopae committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    bee7537 View commit details
    Browse the repository at this point in the history
  3. Let wx.ScrolledView handle vertical scrolling, too

    This makes our panel render the full document (rather than just the part which is currently visible due to the scroll position), and then let wx.ScrollView scroll through that fully-rendered view.
    
    This is still incomplete, as it lacks
    - porting the remaining scrolling functionality from our panel to wx.ScrolledView (e. g. `makeLineVisible`, which should automatically scroll to the current line)
    - port all views over to render the full document rather than only the currently visible parts, and provide information about size and line height
    
    It also has the draw-back that it always renders the full document, which might lead to performance problems with really large documents and/or older computers (not tested yet and no issues know, but theoretically, it increases the use of resources).
    janopae committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    650c749 View commit details
    Browse the repository at this point in the history