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

QGroupBox: text overlaping by another widget #295

Open
Jihadist opened this issue Oct 28, 2021 · 3 comments
Open

QGroupBox: text overlaping by another widget #295

Jihadist opened this issue Oct 28, 2021 · 3 comments

Comments

@Jihadist
Copy link
Contributor

  • QDarkStyle: 26c3878 QDarkStyleSheet (v3.0.2)
  • Python: Python 3.8.10 Linux
  • QT_API: 5.15.2

Language

C++

Description / Steps to Reproduce [if necessary]

  1. Install style sheet

Actual Result

Linux Ubuntu 20.10
image
Windows 7
image

Expected Results / Proposed Result

Text is not overlapped by another widget

@Jihadist
Copy link
Contributor Author

If I change it https://github.com/ColinDuquesnoy/QDarkStyleSheet/blob/master/qdarkstyle/dark/style.qss#L217 to

QGroupBox {
  font-weight: bold;
  border: 1px solid #455364;
  border-radius: 4px;
  padding: 2px;
  margin-top: 14px;
  margin-bottom: 4px;
}

QGroupBox::title {
  subcontrol-origin: margin;
  subcontrol-position: top left;
  left: 4px;
  padding-left: 2px;
  padding-right: 4px;
  padding-top: -8px;
}

it looks better on Linux
image
but worse on Windows
image
I dont know how to pass correct top-padding for both platforms.

@dpizetta
Copy link
Collaborator

@Jihadist these numbers are a little trick. Something that will help us a lot is: Could you reproduce this in other versions of our qdarkstyle? 2.8.X and 3.0.X, Also with other Qt like 12.3. We have changed this code recently, so we can revert. Tks

@Jihadist
Copy link
Contributor Author

Jihadist commented Nov 29, 2021

Look at font. Windows by default uses one font, Linux uses another, so these numbers cannot work ok on both platforms. I tried to explicitly specify font and then played with this numbers. It was ok but we need one font on qss level. I don't have any other ideas.

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

No branches or pull requests

2 participants