From 38a364f4010e0649b04fbc529fe8c8d926b6b5ac Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 12 Mar 2024 19:57:21 +0100 Subject: small ui improvements --- src/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 03c4010..4520d9c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,7 +181,6 @@ static int _ts_create_menu(int window_w, int window_h) { if (ifd::FileDialog::Instance().HasResult()) { std::string res = ifd::FileDialog::Instance().GetResult().u8string(); last_export_result = ts_export_result(current_search_result, (const utf8_int8_t *)res.c_str()); - printf("%d\n", last_export_result); utf8ncpy(save_path, (const utf8_int8_t *)res.c_str(), sizeof(save_path)); // Set titlebar name. @@ -212,7 +211,7 @@ static int _ts_create_menu(int window_w, int window_h) { break; } - ImGui::Dummy({0, 70}); + ImGui::Dummy({0, 20}); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); if (ImGui::Button("Close")) { last_export_result = EXPORT_NONE; @@ -260,6 +259,9 @@ void _ts_create_file_match_rows() { ImGui::TableNextColumn(); ImGui::TableHeader(""); + + ImGui::SameLine(); + ImGui::Selectable("##nolabel", false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap); } } @@ -298,6 +300,9 @@ void _ts_create_file_error_rows() { ImGui::TableNextColumn(); ImGui::TableHeader(_ts_file_error_to_message((ts_file_open_error)file->error)); + + ImGui::SameLine(); + ImGui::Selectable("##nolabel", false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap); } } @@ -499,7 +504,6 @@ void ts_create_gui(int window_w, int window_h) { { // Results ImGui::SetNextWindowPos({5, pos_y}); - ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImGui::ColorConvertU32ToFloat4(0xEAEAEA)); if (ImGui::BeginTable("results-table", 3, ImGuiTableFlags_BordersH|ImGuiTableFlags_ScrollY|ImGuiTableFlags_RowBg|ImGuiTableFlags_SizingFixedFit, {(float)window_w-7.0f, (float)result_area_height})) { @@ -528,7 +532,6 @@ void ts_create_gui(int window_w, int window_h) { ImGui::EndTable(); } - ImGui::PopStyleColor(); } else { // Help text ImGui::Separator(); -- cgit v1.2.3-70-g09d2