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

Wizard font size issues #6156

Closed
PVince81 opened this issue Nov 13, 2017 · 14 comments
Closed

Wizard font size issues #6156

PVince81 opened this issue Nov 13, 2017 · 14 comments
Labels
bug Design & UX ReadyToTest QA, please validate the fix/enhancement
Milestone

Comments

@PVince81
Copy link
Contributor

screenshot_20171113_110519

Setup

owncloud-client-2.4.0~alpha1-8649.1.x86_64
plasma5-workspace-5.11.2-1.2.x86_64
openSUSE Tumbleweed

I'm on a HighDPI screen and I might have tweaked some fonts in Plasma 5:

screenshot_20171113_110625

@jnweiger
Copy link
Contributor

This is not only the header: #6158

@ckamm ckamm added this to the 2.4.0 milestone Nov 14, 2017
@ckamm
Copy link
Contributor

ckamm commented Nov 14, 2017

Adding @jnweiger's image from #6158 here:

@ckamm ckamm changed the title Dialog header font size issue Wizard font size issues Nov 14, 2017
@ogoffart
Copy link
Contributor

Can be reproduced on linux on a normal screen by setting an env variable, for example:
QT_FONT_DPI=180

@ogoffart
Copy link
Contributor

I think the problem is that QWizard has some sizes hardcoded, and it cannot be resized dynamically

@ogoffart
Copy link
Contributor

It turns out that we make the wizard a fixed size by setting a banner to it.
The size of the banner is hardcoded in Theme::wizardHeaderBanner. Maybe we should scale it by the DPI

@ogoffart
Copy link
Contributor

Suggested fix: #6164

@jnweiger
Copy link
Contributor

jnweiger commented Nov 14, 2017

I believe the fix from @ogoffart should help with Vincent's example, -- but probably not with mine.

@ogoffart
Copy link
Contributor

@jnweiger yes, it fixes both, the width of the wizard is fixed and the same as the width of the header banner

@ogoffart ogoffart added the ReadyToTest QA, please validate the fix/enhancement label Nov 15, 2017
@SamuAlfageme
Copy link
Contributor

@SamuAlfageme
Copy link
Contributor

@ogoffart I think the "Add Folder Sync Connection" button also has a prefixed width; the label is not being wrapped as for 2.4.0nightly-20171121:

@ogoffart
Copy link
Contributor

ogoffart commented Nov 23, 2017

@SamuAlfageme That's really strange. I cannot reproduce the problem with the nightly, how do you reproduce it?
Also noprmaly the size of this button is computed with the size of the text, i don't see how they can get out of sync.

Edit: What platform is this?

@SamuAlfageme
Copy link
Contributor

@ogoffart might be a Qt upstream bug:

  • Win10
  • resolution 1920x1015
  • scale 100%
  • Text size for icons: 7pt (it seems to determine button labels as well)

I remember an issue where extremely small text sizes also caused normally-hidden labels to be displayed: e.g. this is with a 6pt text size

@ogoffart
Copy link
Contributor

ogoffart commented Nov 23, 2017

@SamuAlfageme ah, I can reproduce, thank you.
However this is a different issue entierly.

Edit: fixed in #6186

ogoffart added a commit that referenced this issue Nov 23, 2017
The problem here is that the QPainter is created on the viewport with is a
QWidget, but QAbstractItemView can have a different font, and the
QStyleOptionViewItem::font is this font. QStyleOptionViewItem::font
was used to compute the sizeHint, and the default font from the QPainter
was used to draw the text, so they could be not in sync.

Fix it by always using the font for QPushButton

Reported in
#6156 (comment)
guruz pushed a commit that referenced this issue Nov 25, 2017
The problem here is that the QPainter is created on the viewport with is a
QWidget, but QAbstractItemView can have a different font, and the
QStyleOptionViewItem::font is this font. QStyleOptionViewItem::font
was used to compute the sizeHint, and the default font from the QPainter
was used to draw the text, so they could be not in sync.

Fix it by always using the font for QPushButton

Reported in
#6156 (comment)
@guruz
Copy link
Contributor

guruz commented Dec 4, 2017

@guruz guruz closed this as completed Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Design & UX ReadyToTest QA, please validate the fix/enhancement
Projects
None yet
Development

No branches or pull requests

6 participants