feat(market): portfolio groups as a draggable/resizable dashboard grid
Turn the portfolio group area into a dashboard grid: - Responsive column count (1-4 by width); each 1x1 cell is one card. - Drag a card to move it to another cell; drag its bottom-right corner to resize (span multiple cells). Both snap to the grid. - A subtle dot grid appears while rearranging (dragging or resizing), with a highlighted drop-target / resize footprint. - Click (no drag past a 4px threshold) still opens the group editor. - Grid placement (col/row) and span (w/h) persist per group in settings.json; positions are resolved each frame — stored placement when it fits, else auto-placed row-major into free cells. Dropping onto an occupied cell swaps. PortfolioEntry gains grid_col/grid_row/grid_w/grid_h. The card render was refactored into a drawCard() lambda reused for the in-grid, dragged, and resizing states. Full-node + Lite build clean; ctest 1/1; hygiene clean. This is an interactive feature I can't verify without the GUI — needs drag/resize testing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,12 @@ public:
|
||||
bool showValue = true; // show the converted/fiat value on the card
|
||||
bool show24h = false; // show the 24h % change (live-market bases only)
|
||||
bool showSparkline = false; // show a price-trend sparkline (live-market bases only)
|
||||
// Dashboard grid placement on the Market portfolio. col/row in grid cells (-1 = auto-place),
|
||||
// w/h in cells (span). Set when the user drags/resizes a card.
|
||||
int gridCol = -1;
|
||||
int gridRow = -1;
|
||||
int gridW = 1;
|
||||
int gridH = 1;
|
||||
};
|
||||
|
||||
// Theme
|
||||
|
||||
Reference in New Issue
Block a user