Browse Source

Fix rack rail when resizing. Decrease size of rack rail framebuffer.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
c5d011f1e8
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/app/RackWidget.cpp

+ 4
- 1
src/app/RackWidget.cpp View File

@@ -104,7 +104,10 @@ void RackWidget::draw(const DrawArgs &args) {
// Resize and reposition the RackRail to align on the grid.
math::Rect railBox;
railBox.pos = args.clipBox.pos.div(BUS_BOARD_GRID_SIZE).floor().mult(BUS_BOARD_GRID_SIZE);
railBox.size = args.clipBox.size.div(BUS_BOARD_GRID_SIZE).floor().plus(math::Vec(5, 2)).mult(BUS_BOARD_GRID_SIZE);
railBox.size = args.clipBox.size.div(BUS_BOARD_GRID_SIZE).ceil().plus(math::Vec(1, 1)).mult(BUS_BOARD_GRID_SIZE);
if (!railFb->box.size.isEqual(railBox.size)) {
railFb->dirty = true;
}
railFb->box = railBox;

RackRail *rail = railFb->getFirstDescendantOfType<RackRail>();


Loading…
Cancel
Save