Replace the custom code with Kirigami's implementation for consistency. BUG: 442776
mentioned in commit 5a62f822