refactor(ui): remove abandoned Material-Design component library + screens layer

~9,988 lines of header-only UI code that no compiled translation unit reached,
verified by transitive include-reachability from every .cpp plus a symbol sweep
(all 28 component classes — Snackbar, Ripple, NavDrawerSpec, TabBarSpec,
TransitionManager, … — had zero references in live code):

- src/ui/material/ component library: the material.h umbrella, components/*
  (app_bar, cards, chips, dialogs, inputs, lists, nav_drawer, progress, slider,
  snackbar, tabs, text_fields), and the animation system (elevation, motion,
  ripple, transitions, app_layout) — 19 headers. Kept the live helpers the app
  actually uses directly: color_theme, colors, type/typography, draw_helpers,
  layout, project_icons, and components/buttons (included by mining_tab).
- src/ui/screens/ layer: main_layout, home_screen, send_screen, etc. — the
  original screen stack and the only consumer of the dead component library.
  The live UI runs through ui/windows/ (34 .cpp) + ui/pages/.
- src/embedded/resources.h: a superseded dragonx::embedded::Resources duplicate;
  the app uses src/resources/embedded_resources.h.

None were in CMakeLists or included by live code, so the build is unaffected.
Both variants build; full test suite passes; source-hygiene check clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 11:31:06 -05:00
parent a5da5562cf
commit ca14aaddc7
31 changed files with 1 additions and 9989 deletions

View File

@@ -1,65 +0,0 @@
// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
// Embedded Resources Header
// This provides access to resources embedded in the binary
#pragma once
#include <cstddef>
#include <cstdint>
#include <string>
#include <unordered_map>
namespace dragonx {
namespace embedded {
// Forward declarations for embedded data (generated at build time)
struct EmbeddedResource {
const unsigned char* data;
size_t size;
};
// Resource registry
class Resources {
public:
static Resources& instance() {
static Resources inst;
return inst;
}
// Get embedded resource by name
// Returns nullptr if not found
const EmbeddedResource* get(const std::string& name) const {
auto it = resources_.find(name);
if (it != resources_.end()) {
return &it->second;
}
return nullptr;
}
// Check if resource exists
bool has(const std::string& name) const {
return resources_.find(name) != resources_.end();
}
// Register a resource (called during static init)
void registerResource(const std::string& name, const unsigned char* data, size_t size) {
resources_[name] = {data, size};
}
private:
Resources() = default;
std::unordered_map<std::string, EmbeddedResource> resources_;
};
// Helper macro for registering resources
#define REGISTER_EMBEDDED_RESOURCE(name, data, size) \
static struct _EmbeddedResourceRegister_##name { \
_EmbeddedResourceRegister_##name() { \
dragonx::embedded::Resources::instance().registerResource(#name, data, size); \
} \
} _embedded_resource_register_##name
} // namespace embedded
} // namespace dragonx