Merge branch 'rework' of https://github.com/Aang23/satdump_rework into rework

This commit is contained in:
ZbychuButItWasTaken 2022-09-14 01:56:03 +02:00
commit 65945fc25c
5 changed files with 10 additions and 10 deletions

View file

@ -99,7 +99,6 @@ dependencies {
copyResources.dependsOn deleteTempAssets
copyPipelines.dependsOn deleteTempAssets
copyFonts.dependsOn deleteTempAssets
copyCfg.dependsOn deleteTempAssets
copyPlugins_arm64v8a.dependsOn deleteTempAssets
@ -109,7 +108,6 @@ copyPlugins_x86_64.dependsOn deleteTempAssets
preBuild.dependsOn copyResources
preBuild.dependsOn copyPipelines
preBuild.dependsOn copyFonts
preBuild.dependsOn copyCfg
preBuild.dependsOn copyPlugins_arm64v8a

Binary file not shown.

View file

@ -24,7 +24,7 @@ namespace style
ImGui::GetStyle().PopupRounding = round;
ImGui::GetStyle().ScrollbarRounding = round;
setFonts(resources::getResourcePath("fonts/font.ttf"));
setFonts();
ImGui::StyleColorsDark();
// ImGui::StyleColorsLight();
@ -42,7 +42,7 @@ namespace style
ImGui::GetStyle().PopupRounding = round;
ImGui::GetStyle().ScrollbarRounding = round;
setFonts(resources::getResourcePath("fonts/font.ttf"));
setFonts();
ImGui::StyleColorsLight();
@ -109,7 +109,7 @@ namespace style
ImGui::GetStyle().PopupRounding = round;
ImGui::GetStyle().ScrollbarRounding = round;
setFonts(resources::getResourcePath("fonts/font.ttf"));
setFonts();
ImGui::StyleColorsDark();
@ -180,12 +180,12 @@ namespace style
ImGui::PopStyleColor(3);
}
void setFonts(std::string fontName)
void setFonts()
{
static const ImWchar ranges[] = {0x20, 0xFFFF, 0};
static ImFontConfig config;
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 16.0f * ui_scale, &config, ranges);
bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 45.0f * ui_scale, &config, ranges);
hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 128.0f * ui_scale, &config, ranges);
baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/font.ttf").c_str(), 16.0f * ui_scale, &config, ranges);
bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/Roboto-Medium.ttf").c_str(), 45.0f * ui_scale); //, &config, ranges);
hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/Roboto-Medium.ttf").c_str(), 128.0f * ui_scale); //, &config, ranges);
}
}

View file

@ -14,5 +14,5 @@ namespace style
bool setDarkStyle(float dpi_scaling = 1.0f);
void beginDisabled();
void endDisabled();
void setFonts(std::string fontName);
void setFonts();
}

View file

@ -159,6 +159,8 @@ namespace satdump
{
projection_layers.erase(projection_layers.begin() + i);
ImGui::EndGroup();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
break;
}
ImGui::PopStyleColor();