Skip to content

Properly set a default implicitWidth/implicitHeight without reimplementing them

Noah Davis requested to merge work/ndavis/implicitwidthheight into master

Simply removing the code allows implicitWidth and implicitHeight to be used as a way to set the default/preferred icon size. Without this patch, they are hardcoded to 32, which isn't very useful. I have set the default implicit size to 32 to prevent things from breaking though.

I checked the git history and the custom behavior seems to have originally come from DesktopIcon, but it doesn't seem to have much to do with what we currently use Kirigami Icon for.

A lot of the logic used with QQC2 and Layouts assumes that implicitWidth and implicitHeight will provide the default/preferred size, so this makes Kirigami Icon more intuitive for anyone used to other kinds of elements based on QQuickItem.

cc: @mart

Edited by Marco Martin

Merge request reports