From 287712a6474e079fd3e1208ba578aa3a2df5f192 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 26 Aug 2022 19:16:48 -0400 Subject: [PATCH] app_server: Adjust borders of the resize knob depending on the handle size. Appearance remains the same at the standard decorator sizes (12pt fonts), but this looks better on larger font sizes. Unfortunately it doesn't scale quite correctly; the scrollbars in Tracker do not align with this quite correctly. Probably the -0/-1 need to be adjusted based on the window border sizes, but we don't have those metrics readily available in this function. Yet another reason all these classes need a major refactor... --- src/servers/app/decorator/DefaultDecorator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/servers/app/decorator/DefaultDecorator.cpp b/src/servers/app/decorator/DefaultDecorator.cpp index b8393211f7..858ae98132 100644 --- a/src/servers/app/decorator/DefaultDecorator.cpp +++ b/src/servers/app/decorator/DefaultDecorator.cpp @@ -450,7 +450,8 @@ DefaultDecorator::_DrawResizeKnob(BRect rect, bool full, fDrawingEngine->FillRect(rect, gradient); - BPoint offset1(15, 15), offset2(14, 14); + BPoint offset1(rect.Width(), rect.Height()), + offset2(rect.Width() - 1, rect.Height() - 1); fDrawingEngine->StrokeLine(BPoint(x, y) - offset1, BPoint(x - offset1.x, y - 2), colors[0]); fDrawingEngine->StrokeLine(BPoint(x, y) - offset2,