fix(infra): gradle_run detecta android-sdk — issue 0076 #2

Open
dataforge wants to merge 538 commits from auto/0076-gradle-sdk-detect into master
Showing only changes of commit ebc012a5db - Show all commits
+15
View File
@@ -20,6 +20,7 @@
#include "demo.h"
#include "capture.h"
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
@@ -154,6 +155,20 @@ static void render() {
ImGui::BeginChild("##gallery_content", ImVec2(0, 0),
ImGuiChildFlags_Borders,
ImGuiWindowFlags_HorizontalScrollbar);
// Cuando cambia el tamaño de fuente (Settings > Size), el contenido
// del child crece/encoge pero la posicion de scroll en pixeles
// no — efecto: lo visible "se baja". Escalamos scroll_y por el
// ratio de fuentes para mantener la misma linea logica arriba.
{
static float s_prev_font_size = 0.0f;
float cur_font_size = ImGui::GetStyle().FontSizeBase;
if (s_prev_font_size > 0.0f &&
std::fabs(s_prev_font_size - cur_font_size) > 0.01f) {
ImGui::SetScrollY(ImGui::GetScrollY() *
(cur_font_size / s_prev_font_size));
}
s_prev_font_size = cur_font_size;
}
const DemoEntry* d = find_demo(g_selected_id);
if (d && d->fn) d->fn();
ImGui::EndChild();