refactor(ui): delete dead button code (buttons.h + ApplyTactile)
UI-standardization audit found two dead, contradictory "how to draw a button" surfaces with zero call sites: - src/ui/material/components/buttons.h (353 lines: TextButton/Outlined/Contained/ Button(spec)/IconButton/FAB) — included by 3 mining files but never used. - ApplyTactile (draw_helpers.h) — a retrofit-tactile-onto-plain-button wrapper, never called. Remove the file, the 3 dead includes, and ApplyTactile. TactileButton/StyledButton remain the canonical button helpers. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -260,18 +260,6 @@ inline void DrawButtonGlassOverlay(ImDrawList* dl, const ImVec2& bMin,
|
||||
DrawTactileOverlay(dl, bMin, bMax, rounding, active);
|
||||
}
|
||||
|
||||
// Convenience: call right after any ImGui::Button() / SmallButton() call
|
||||
// to add tactile depth. Uses the last item rect automatically.
|
||||
inline void ApplyTactile(ImDrawList* dl = nullptr)
|
||||
{
|
||||
if (!dl) dl = ImGui::GetWindowDrawList();
|
||||
ImVec2 bMin = ImGui::GetItemRectMin();
|
||||
ImVec2 bMax = ImGui::GetItemRectMax();
|
||||
float rounding = ImGui::GetStyle().FrameRounding;
|
||||
bool active = ImGui::IsItemActive();
|
||||
DrawTactileOverlay(dl, bMin, bMax, rounding, active);
|
||||
}
|
||||
|
||||
// ── Button font tier helper ─────────────────────────────────────────────
|
||||
// Resolves an int tier (0=sm, 1=md/default, 2=lg) to the matching ImFont*.
|
||||
// Passing -1 or any out-of-range value returns the default button font.
|
||||
|
||||
Reference in New Issue
Block a user