refactor: extract CARD_HEIGHT to shared CardDimensions header (#6668)

* refactor: extract CARD_HEIGHT to shared CardDimensions header

  Move duplicated CARD_WIDTH/CARD_HEIGHT constants to card_dimensions.h.
  Fixed documentation in z_value_layer_manager.h.

* WIDTH_F used directly instead of casting

* Improved consistency and added missing newlines at end of files
This commit is contained in:
DawnFire42 2026-03-05 22:13:58 -05:00 committed by GitHub
parent 14f1925edc
commit bd5cbb89d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 108 additions and 78 deletions

View file

@ -458,7 +458,7 @@ void ZoneViewWidget::resizeScrollbar(const qreal newZoneHeight)
*/
static qreal rowsToHeight(int rows)
{
const qreal cardsHeight = (rows + 1) * (CARD_HEIGHT / 3);
const qreal cardsHeight = (rows + 1) * (CardDimensions::HEIGHT_F / 3);
return cardsHeight + 5; // +5 padding to make the cutoff look nicer
}
@ -574,4 +574,4 @@ void ZoneViewWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
if (event->pos().y() <= 0) {
expandWindow();
}
}
}