Skip to content

tastenbrett: Fix drawing shapes with offsets

Ismael Asensio requested to merge work/iasensio/tastenbrett-fixes-dellm65 into master

Changes

  • Fix drawing rounded rectangles with an offset

    roundedRect() takes position and size but we were providing the top-left and bottom-right corners, which fails when the shape has an offset

  • Add the defined gap also to the first key in a row

    The first key in a row can also have a gap to reposition itself respect to the row.

    While at it, simplify how to get the position of the previous key

Testing

The Dell m65 is the layout that better showcases the fix, because it makes heavy use of these offsets \ but once you know where to look there are also small improvements in other layotus

tastenbrett -l us --model dellm65

Screenshots

Not adding the changes in !2448 (merged) here, because they are perfectly independent

Before After
tastenbrett-dellm65-before tastenbrett-dellm65-after

Merge request reports