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

@ -1,6 +1,7 @@
#ifndef Z_VALUES_H
#define Z_VALUES_H
#include "card_dimensions.h"
#include "z_value_layer_manager.h"
/**
@ -70,8 +71,7 @@ constexpr qreal TOP_UI = ZValueLayerManager::overlayZValue(7.0);
*/
[[nodiscard]] constexpr qreal tableCardZValue(qreal x, qreal y)
{
constexpr qreal CARD_HEIGHT_FOR_Z = 102.0;
return (y + CARD_HEIGHT_FOR_Z) * 100000.0 + (x + 1) * 100.0;
return (y + CardDimensions::HEIGHT_F) * 100000.0 + (x + 1) * 100.0;
}
// Card layering (general architecture, not command-zone specific)