Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the steps in the Pattern Editor scalable #7175

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Mar 28, 2024

  1. Replace pngs with svgs

    Replace the pngs of the step buttons with the svgs from the previous branch.
    
    Adjust the code so they are rendered with the maximum available height.
    michaelgregorius committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    97c48ca View commit details
    Browse the repository at this point in the history
  2. Fix height of steps

    Ensure minimal height of 24 pixels like the pngs. Take border offsets into account.
    michaelgregorius committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    26677a4 View commit details
    Browse the repository at this point in the history
  3. Fix mouse clicks for larger step buttons

    Fix the method `mousePressEvent` so that it also works with the larger step buttons. The main change is the adjusted check for the y coordinate.
    
    All other changes are just refactoring and reformatting of the method's code.
    michaelgregorius committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    1b1df06 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2024

  1. Configuration menu
    Copy the full SHA
    75c1acf View commit details
    Browse the repository at this point in the history
  2. Extract step computation in method

    Extract the computation of the selected step into a dedicated method in `MidiClipView`. The removes duplicated code in the mouse press and wheel event handling code.
    
    The method `getStep` returns an `std::optional` which contains the value of the step if the calculation was successful. It also contains the check for the height.
    
    The calculation with floats was removed in `getStep` as it should not be necessary.
    
    Adjust `MidiClipView::wheelEvent` so that it now computes the step in the same way as the mouse event handler. This reinstates the functionality to set the note velocities with the mouse wheel even if the beat pattern is enlarged.
    michaelgregorius committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    0959b6d View commit details
    Browse the repository at this point in the history
  3. Install SVGs in theme directories

    Adjust `data/themes/CMakeLists.txt` so that SVGs in the theme directories are also installed.
    michaelgregorius committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    eb80173 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Fix rendering artifacts

    Fix artifacts that occur when Qt is requested to render SVGs into very small pixmaps. This is done by making sure that the SVG is always rendered into pixmaps that are at least 24x24 in size (the size of the original PNG pixmap).
    
    Adjust the pixmap drawing code so that a potentially larger source pixmap is drawn into a smaller target pixmap.
    michaelgregorius committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    6797678 View commit details
    Browse the repository at this point in the history