Application: minor style changes.
This commit is contained in:
parent
e10e457ad8
commit
2f70aa7672
3 changed files with 8 additions and 12 deletions
|
@ -130,7 +130,7 @@ Application::Application(const Arguments& arguments):
|
||||||
}
|
}
|
||||||
|
|
||||||
if(conf().skipDisclaimer()) {
|
if(conf().skipDisclaimer()) {
|
||||||
_uiState = UiState::Initialising;
|
_uiState = UiState::Initialising;
|
||||||
_initThread = std::thread{[this]{ initialiseManager(); }};
|
_initThread = std::thread{[this]{ initialiseManager(); }};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ void
|
||||||
Application::viewportEvent(ViewportEvent& event) {
|
Application::viewportEvent(ViewportEvent& event) {
|
||||||
GL::defaultFramebuffer.setViewport({{}, event.framebufferSize()});
|
GL::defaultFramebuffer.setViewport({{}, event.framebufferSize()});
|
||||||
|
|
||||||
const Vector2 size = Vector2{windowSize()}/dpiScaling();
|
const auto size = Vector2{windowSize()}/dpiScaling();
|
||||||
_imgui.relayout(size, windowSize(), framebufferSize());
|
_imgui.relayout(size, windowSize(), framebufferSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ Application::drawDisclaimer() {
|
||||||
ImGui::TableSetColumnIndex(1);
|
ImGui::TableSetColumnIndex(1);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {24.0f, 12.0f});
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {24.0f, 12.0f});
|
||||||
if(ImGui::Button("I understand the risks")) {
|
if(ImGui::Button("I understand the risks")) {
|
||||||
_uiState = UiState::Initialising;
|
_uiState = UiState::Initialising;
|
||||||
_initThread = std::thread{[this]{ initialiseManager(); }};
|
_initThread = std::thread{[this]{ initialiseManager(); }};
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
|
|
@ -29,11 +29,8 @@
|
||||||
namespace mbst {
|
namespace mbst {
|
||||||
|
|
||||||
void
|
void
|
||||||
Application::handleFileAction(efsw::WatchID watch_id,
|
Application::handleFileAction(efsw::WatchID watch_id, const std::string&, const std::string& filename,
|
||||||
const std::string&,
|
efsw::Action action, std::string old_filename)
|
||||||
const std::string& filename,
|
|
||||||
efsw::Action action,
|
|
||||||
std::string old_filename)
|
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
SDL_zero(event);
|
SDL_zero(event);
|
||||||
|
|
|
@ -58,8 +58,7 @@ Application::initialiseGui() {
|
||||||
LOG_INFO("Initialising Dear ImGui.");
|
LOG_INFO("Initialising Dear ImGui.");
|
||||||
|
|
||||||
auto ctx = ImGui::CreateContext();
|
auto ctx = ImGui::CreateContext();
|
||||||
|
auto& io = ImGui::GetIO();
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
|
||||||
|
|
||||||
const auto size = Vector2{windowSize()}/dpiScaling();
|
const auto size = Vector2{windowSize()}/dpiScaling();
|
||||||
|
|
||||||
|
@ -94,10 +93,10 @@ Application::initialiseGui() {
|
||||||
|
|
||||||
io.IniFilename = nullptr;
|
io.IniFilename = nullptr;
|
||||||
|
|
||||||
ImGuiStyle& style = ImGui::GetStyle();
|
auto& style = ImGui::GetStyle();
|
||||||
|
|
||||||
style.WindowTitleAlign = {0.5f, 0.5f};
|
style.WindowTitleAlign = {0.5f, 0.5f};
|
||||||
style.FrameRounding = 3.2f;
|
style.FrameRounding = 3.2f;
|
||||||
style.Colors[ImGuiCol_WindowBg] = ImColor(0xff1f1f1f);
|
style.Colors[ImGuiCol_WindowBg] = ImColor(0xff1f1f1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue