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:
31
src/ui/windows/console_tab_helpers.cpp
Normal file
31
src/ui/windows/console_tab_helpers.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "console_tab_helpers.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace dragonx {
|
||||
namespace ui {
|
||||
|
||||
float ComputeConsoleInputHeight(float frameHeightWithSpacing,
|
||||
float itemSpacingY,
|
||||
float spacingSm,
|
||||
float spacingXs,
|
||||
float cursorOffset)
|
||||
{
|
||||
return spacingSm + itemSpacingY + frameHeightWithSpacing + spacingSm + spacingXs + cursorOffset;
|
||||
}
|
||||
|
||||
float ComputeConsoleOutputHeight(float availableHeight,
|
||||
float inputHeight,
|
||||
float minHeight,
|
||||
float minHeightRatio)
|
||||
{
|
||||
return std::max(availableHeight - inputHeight, std::max(minHeight, availableHeight * minHeightRatio));
|
||||
}
|
||||
|
||||
float ClampConsoleWrapWidth(float contentWidth, float paddingX)
|
||||
{
|
||||
return std::max(50.0f, contentWidth - paddingX * 2.0f);
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
} // namespace dragonx
|
||||
Reference in New Issue
Block a user