Skip to content

Generate presentation drawing tool icons in a custom QIconEngine, so checkboxes can be sharp on hidpi

The checkboxes in the drawing tool icons in the presentation toolbar were not sharp on hiDPI, this fixes it.

The toolbar buttons are QActions with QIcons, and the icons were created from 25x25 pixmaps. That is usually smaller than the toolbar’s icon size, so the icons had a nice size. But at hiDPI, the icons were scaled up, so the checkmarks looked blurry.

Now the icons are generated in the correct resolution on the fly, because the painting code from ColorAction::setColor() is moved to a custom QIconEngine inside ColorAction.

Before (on hiDPI):

Presentation_Toolbar_1

After (on hiDPI):

Presentation_Toolbar_5

BUG: 419221

Edited by Laura David Hurka

Merge request reports