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

Implement zooming #85

Closed
wants to merge 14 commits into from
Closed

Implement zooming #85

wants to merge 14 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

Commits on Nov 5, 2023

  1. Configuration menu
    Copy the full SHA
    fd5c593 View commit details
    Browse the repository at this point in the history
  2. Don't scroll the vertical scroll bar away

    Before this commit, horizontal scrolling also moves the vertical scroll bar.
    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    6f99b1b View commit details
    Browse the repository at this point in the history
  3. Remove redundant comment

    I specifically implemented fd5c593 to make this comment not necessary
    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    cc9cfae View commit details
    Browse the repository at this point in the history
  4. Draw pages and their content in a scaled graphics context

    Using a GraphicsContext, drawings can be scaled using wxWidgets.
    
    But attention: Logic that changes the layout based on certain pixel constants might still use the old constants.
    
    Click events on the canvas don't respect the scale factor yet.
    
    And there is still a bug that text is not aligned correctly.
    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    69ec573 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9a7ad1f View commit details
    Browse the repository at this point in the history
  6. Improve command descriptions

    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    38b768a View commit details
    Browse the repository at this point in the history
  7. Respect zoom when calculating minimum width of MyCtrl

    Before this commit, the horizontal scrollbar wouldn't appear when the page was too wide because it was zoomed.
    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    ebd1dae View commit details
    Browse the repository at this point in the history
  8. Respect zoom for calculations that take the available size into account

    When calculating layout, we don't take zoom into account – instead, the zoom later gets added to the values that our layout code calculates.
    
    When taking the available size into account, our layout code used the `GetClientSize` method of `MyCtrl`, which offered the real size of the rendered widget, which corresponds to the sizes *after* the zoom has been taken into account.
    
    This caused things like the page not being centered when zoomed or the side-by-side layout mode refusing to show more pages when zooming out.
    
    This commit introduces the `GetLogicalClientSize` method, which translates the actual client size to one that can be used when calculating the layout.
    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    af593c4 View commit details
    Browse the repository at this point in the history
  9. Improve wording

    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    357bed8 View commit details
    Browse the repository at this point in the history
  10. Format documentation

    janopae committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    ebf8000 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Rename GraphicsContext to DrawingContext

    It's actually a DrawingContext drawing to a GraphicsContext
    janopae committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    102ddc3 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    d7dd8aa View commit details
    Browse the repository at this point in the history