Skip to content

Commit 0fa6693

Browse files
committed
Overlay: rounded corners
1 parent a8ce6db commit 0fa6693

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/overlay/overlay.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,27 @@ void Overlay::init_imgui()
229229
// Setup Dear ImGui style
230230
ImGui::StyleColorsDark();
231231
//ImGui::StyleColorsLight();
232+
233+
ImGuiStyle& style = ImGui::GetStyle();
234+
style.PopupRounding = 20.0f;
235+
style.WindowRounding = 20.0f;
236+
style.ChildRounding = 20.0f;
237+
style.FrameRounding = 6.0f; // For buttons and other frames
238+
style.ScrollbarRounding = 6.0f;
239+
style.GrabRounding = 6.0f; // For sliders and scrollbars
240+
style.TabRounding = 6.0f;
232241

233242
ImGui::GetStyle().Colors[ImGuiCol_WindowBg].w = Overlay::GlobalOpacity;
234243
ImGui::GetIO().FontGlobalScale = Overlay::GlobalFontScale;
235244
}
236245

237-
void ForceShowCursor(bool show) {
246+
void ForceShowCursor(bool show)
247+
{
238248
int counter = 0;
239249

240250
// Adjust the counter until the cursor visibility matches the desired state
241-
do {
251+
do
252+
{
242253
counter = ShowCursor(show);
243254
} while ((show && counter < 0) || (!show && counter >= 0));
244255
}

0 commit comments

Comments
 (0)