Refactor app services and stabilize refresh/UI flows
- Add refresh scheduler and network refresh service boundaries for typed refresh results, ordered RPC collectors, applicators, and price parsing. - Add daemon lifecycle and wallet security workflow helpers while preserving App-owned command RPC, decrypt, cancellation, and UI handoff behavior. - Split balance, console, mining, amount formatting, and async task logic into focused modules with expanded Phase 4 test coverage. - Fix market price loading by triggering price refresh immediately, avoiding queue-pressure drops, tracking loading/error state, and adding translations. - Polish send, explorer, peers, settings, theme/schema, and related tab UI. - Replace checked-in generated language headers with build-generated resources. - Document the cleanup audit, UI static-state guidance, and architecture updates.
This commit is contained in:
65
src/ui/windows/balance_address_list.h
Normal file
65
src/ui/windows/balance_address_list.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include "data/wallet_state.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dragonx {
|
||||
namespace ui {
|
||||
|
||||
struct AddressListInput {
|
||||
const AddressInfo* info = nullptr;
|
||||
bool isZ = false;
|
||||
bool hidden = false;
|
||||
bool favorite = false;
|
||||
std::string label;
|
||||
std::string icon;
|
||||
int sortOrder = -1;
|
||||
};
|
||||
|
||||
struct AddressListRow {
|
||||
const AddressInfo* info = nullptr;
|
||||
bool isZ = false;
|
||||
bool hidden = false;
|
||||
bool favorite = false;
|
||||
std::string label;
|
||||
std::string icon;
|
||||
int sortOrder = -1;
|
||||
};
|
||||
|
||||
struct AddressRowRect {
|
||||
float x = 0.0f;
|
||||
float y = 0.0f;
|
||||
float width = 0.0f;
|
||||
float height = 0.0f;
|
||||
};
|
||||
|
||||
struct AddressRowLayout {
|
||||
float contentStartX = 0.0f;
|
||||
float contentStartY = 0.0f;
|
||||
float labelX = 0.0f;
|
||||
float contentRight = 0.0f;
|
||||
float buttonSize = 0.0f;
|
||||
AddressRowRect favoriteButton;
|
||||
AddressRowRect visibilityButton;
|
||||
};
|
||||
|
||||
bool AddressListMatchesFilter(const AddressListInput& input, const std::string& filter);
|
||||
std::vector<AddressListRow> BuildAddressListRows(const std::vector<AddressListInput>& inputs,
|
||||
const std::string& filter,
|
||||
bool hideZeroBalances,
|
||||
bool showHidden);
|
||||
AddressRowLayout ComputeAddressRowLayout(float rowX,
|
||||
float rowY,
|
||||
float rowWidth,
|
||||
float rowHeight,
|
||||
float rowPadLeft,
|
||||
float rowIconSize,
|
||||
float spacingMd,
|
||||
float spacingSm,
|
||||
float spacingXs);
|
||||
std::string FormatAddressUsdValue(double balance, double priceUsd);
|
||||
|
||||
} // namespace ui
|
||||
} // namespace dragonx
|
||||
Reference in New Issue
Block a user