Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make title position not account for shadow width #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bertini97
Copy link

As description says.

@grulja
Copy link
Contributor

grulja commented Jun 18, 2024

I would prefer something like:

diff --git a/src/qadwaitadecorations.cpp b/src/qadwaitadecorations.cpp
index 0694319..7f9ce26 100644
--- a/src/qadwaitadecorations.cpp
+++ b/src/qadwaitadecorations.cpp
@@ -480,8 +480,13 @@ void QAdwaitaDecorations::paint(QPaintDevice *device)
 
     // Window title
     {
+#ifdef HAS_QT6_SUPPORT
+        const QRect top = QRect(margins(ShadowsExcluded).left(), margins().bottom(), surfaceRect.width(),
+                                margins().top() - margins().bottom());
+#else
         const QRect top = QRect(margins().left(), margins().bottom(), surfaceRect.width(),
                                 margins().top() - margins().bottom());
+#endif
 #if QT_VERSION >= 0x060700
         const QString windowTitleText = waylandWindow()->windowTitle();
 #else

This is because ceShadowsWidth is always 10 even for non-Qt6 builds and therefore it would break with Qt5. Can you please test whether it does what it's supposed to?

@grulja
Copy link
Contributor

grulja commented Jul 12, 2024

Hi @bertini97, do you plan to update this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants