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

BUG: Fix sample data set labels not appearing on large desktop monitors #6731

Merged
merged 1 commit into from Dec 14, 2022

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Dec 12, 2022

Fixes the issue of clipped labels in Sample Data module by using the default icon size as a basis, which is more robust than computing it relative to window size.

Before the fix:

image

After the fix:

image

Tested on both large desktop and small laptop screens.

@lassoan lassoan added this to the Slicer 5.3 milestone Dec 12, 2022
@lassoan lassoan requested a review from pieper December 12, 2022 16:33
@lassoan lassoan self-assigned this Dec 12, 2022
# two columns of buttons fit into the size of the Welcome module's minimum width
# on screens with a various resolution and scaling (see qt.QDesktopWidget().size,
# desktop.devicePixelRatioF(), qt.QDesktopWidget().physicalDpiX())
iconSize = qt.QSize(int(mainWindow.iconSize.width() * 6), int(mainWindow.iconSize.height() * 4))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 👌🙏

Are the multipliers 6 and 4 required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the multipliers the thumbnails would be as small as the toolbar icons - too small to be useful:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now. Thanks for clarifying.

# two columns of buttons fit into the size of the Welcome module's minimum width
# on screens with a various resolution and scaling (see qt.QDesktopWidget().size,
# desktop.devicePixelRatioF(), qt.QDesktopWidget().physicalDpiX())
iconSize = qt.QSize(int(mainWindow.iconSize.width() * 6), int(mainWindow.iconSize.height() * 4))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now. Thanks for clarifying.

@jcfr
Copy link
Member

jcfr commented Dec 14, 2022

With this change, the rendering is definitely improved on my workstation:

Before After
image image

@jcfr
Copy link
Member

jcfr commented Dec 14, 2022

Increasing the width of the module panel allow to nicely makes use of the available space:

image

@jcfr jcfr merged commit 0ab9513 into main Dec 14, 2022
@jcfr jcfr deleted the lassoan-sample-data-label-patch branch December 14, 2022 18:31
@lassoan
Copy link
Contributor Author

lassoan commented Dec 14, 2022

Thanks for testing!

@jcfr jcfr modified the milestones: Slicer 5.3, Slicer 5.2.2 Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants