|
1 | | -// dear imgui, v1.91b |
| 1 | +// dear imgui, v1.92.0 WIP |
2 | 2 | // (widgets code) |
3 | 3 |
|
4 | 4 | /* |
@@ -867,11 +867,12 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos) |
867 | 867 | if (hovered) |
868 | 868 | window->DrawList->AddRectFilled(bb.Min, bb.Max, bg_col); |
869 | 869 | RenderNavCursor(bb, id, ImGuiNavRenderCursorFlags_Compact); |
870 | | - ImU32 cross_col = GetColorU32(ImGuiCol_Text); |
871 | | - ImVec2 cross_center = bb.GetCenter() - ImVec2(0.5f, 0.5f); |
872 | | - float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f; |
873 | | - window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, +cross_extent), cross_center + ImVec2(-cross_extent, -cross_extent), cross_col, 1.0f); |
874 | | - window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, -cross_extent), cross_center + ImVec2(-cross_extent, +cross_extent), cross_col, 1.0f); |
| 870 | + const ImU32 cross_col = GetColorU32(ImGuiCol_Text); |
| 871 | + const ImVec2 cross_center = bb.GetCenter() - ImVec2(0.5f, 0.5f); |
| 872 | + const float cross_extent = g.FontSize * 0.5f * 0.7071f - 1.0f; |
| 873 | + const float cross_thickness = 1.0f; // FIXME-DPI |
| 874 | + window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, +cross_extent), cross_center + ImVec2(-cross_extent, -cross_extent), cross_col, cross_thickness); |
| 875 | + window->DrawList->AddLine(cross_center + ImVec2(+cross_extent, -cross_extent), cross_center + ImVec2(-cross_extent, +cross_extent), cross_col, cross_thickness); |
875 | 876 |
|
876 | 877 | return pressed; |
877 | 878 | } |
@@ -1484,7 +1485,7 @@ bool ImGui::TextLink(const char* label) |
1484 | 1485 | } |
1485 | 1486 |
|
1486 | 1487 | float line_y = bb.Max.y + ImFloor(g.Font->Descent * g.FontScale * 0.20f); |
1487 | | - window->DrawList->AddLine(ImVec2(bb.Min.x, line_y), ImVec2(bb.Max.x, line_y), GetColorU32(line_colf)); // FIXME-TEXT: Underline mode. |
| 1488 | + window->DrawList->AddLine(ImVec2(bb.Min.x, line_y), ImVec2(bb.Max.x, line_y), GetColorU32(line_colf)); // FIXME-TEXT: Underline mode // FIXME-DPI |
1488 | 1489 |
|
1489 | 1490 | PushStyleColor(ImGuiCol_Text, GetColorU32(text_colf)); |
1490 | 1491 | RenderText(bb.Min, label, label_end); |
@@ -5345,7 +5346,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ |
5345 | 5346 | ImVec2 cursor_screen_pos = ImTrunc(draw_pos + cursor_offset - draw_scroll); |
5346 | 5347 | ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y - g.FontSize + 0.5f, cursor_screen_pos.x + 1.0f, cursor_screen_pos.y - 1.5f); |
5347 | 5348 | if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect)) |
5348 | | - draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_Text)); |
| 5349 | + draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_InputTextCursor), 1.0f); // FIXME-DPI: Cursor thickness (#7031) |
5349 | 5350 |
|
5350 | 5351 | // Notify OS of text input position for advanced IME (-1 x offset so that Windows IME can cover our cursor. Bit of an extra nicety.) |
5351 | 5352 | if (!is_readonly) |
@@ -6214,7 +6215,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl |
6214 | 6215 | if (g.Style.FrameBorderSize > 0.0f) |
6215 | 6216 | RenderFrameBorder(bb.Min, bb.Max, rounding); |
6216 | 6217 | else |
6217 | | - window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color buttons are often in need of some sort of border |
| 6218 | + window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color buttons are often in need of some sort of border // FIXME-DPI |
6218 | 6219 | } |
6219 | 6220 |
|
6220 | 6221 | // Drag and Drop Source |
@@ -7493,7 +7494,7 @@ void ImGui::EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flag |
7493 | 7494 | ImRect box_select_r = bs->BoxSelectRectCurr; |
7494 | 7495 | box_select_r.ClipWith(scope_rect); |
7495 | 7496 | window->DrawList->AddRectFilled(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_SeparatorHovered, 0.30f)); // FIXME-MULTISELECT: Styling |
7496 | | - window->DrawList->AddRect(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_NavCursor)); // FIXME-MULTISELECT: Styling |
| 7497 | + window->DrawList->AddRect(box_select_r.Min, box_select_r.Max, GetColorU32(ImGuiCol_NavCursor)); // FIXME-MULTISELECT FIXME-DPI: Styling |
7497 | 7498 |
|
7498 | 7499 | // Scroll |
7499 | 7500 | const bool enable_scroll = (ms_flags & ImGuiMultiSelectFlags_ScopeWindow) && (ms_flags & ImGuiMultiSelectFlags_BoxSelectNoScroll) == 0; |
|
0 commit comments