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

Fixed high CPU usage with scale factors #1931

Merged
merged 1 commit into from
Aug 28, 2023
Merged

Conversation

tsujan
Copy link
Member

@tsujan tsujan commented Aug 27, 2023

KWindowSystem started to take the scale factor into account; we should also do so in task bar.

NOTE: KWindowSystem 5.101.0, which is our minimum required version, does it too.

Fixes #1926

`KWindowSystem` started to take the scale factor into account; we should also do so in task bar.

NOTE: `KWindowSystem` 5.101.0, which is our minimum required version, does it too.

Fixes #1926
}

// see kwindowsystem -> NETWinInfo::setIconGeometry for the scale factor
const qreal scaleFactor = qApp->devicePixelRatio();
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you want to use the widget's devicePixelRatio()?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because NETWinInfo::setIconGeometry uses app's device ratio.

Copy link
Contributor

@palinek palinek left a comment

Choose a reason for hiding this comment

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

GTM

@tsujan tsujan merged commit 7cfb999 into master Aug 28, 2023
2 checks passed
@tsujan tsujan deleted the task_icon_refreshing branch August 28, 2023 07:23
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.

High CPU load in case of QT_SCALE_FACTOR > 1
2 participants