fix(cpp/viz,core): bell icon TI_BELL, candlestick Setup-inside-BeginPlot, pie legend, kpi sparkline a la derecha
- toast.cpp: TI_BELL en lugar de \xf0\x9f\x94\x94 (fuera del rango cargado por icon_font, renderizaba como ?) - candlestick.cpp: SetupAxes/SetupAxisScale/SetupAxisLimits movidos dentro de BeginPlot/EndPlot — antes el plot desaparecia al entrar - pie_chart.cpp: SetupLegend(East, Outside, NoButtons), eliminado NoLegend - kpi_card.cpp: layout 2 cols con sparkline a la derecha centrado verticalmente
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "core/toast.h"
|
||||
#include "core/tokens.h"
|
||||
#include "core/icons_tabler.h"
|
||||
#include <imgui.h>
|
||||
#include <chrono>
|
||||
#include <deque>
|
||||
@@ -171,10 +172,11 @@ void toast_inbox_button(const char* id) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, radius::sm);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(spacing::xs, spacing::xs));
|
||||
|
||||
// Label: campana UTF-8 (U+1F514 = bell). Si la fuente no lo tiene,
|
||||
// fallback a "!".
|
||||
// Label: TI_BELL (Tabler icon, dentro del rango 0xE000-0xFCFF cargado por
|
||||
// icon_font.cpp). Antes usabamos un emoji U+1F514 (4-byte UTF-8) que cae
|
||||
// fuera del rango y se renderizaba como '?'.
|
||||
char label[64];
|
||||
std::snprintf(label, sizeof(label), "\xf0\x9f\x94\x94%s", id);
|
||||
std::snprintf(label, sizeof(label), TI_BELL "%s", id);
|
||||
|
||||
ImVec2 btn_pos = ImGui::GetCursorScreenPos();
|
||||
const bool clicked = ImGui::Button(label, ImVec2(28.0f, 28.0f));
|
||||
|
||||
Reference in New Issue
Block a user