Skip to content

kcms/fonts: Fix "the entire line in combobox is not highlighted on Wayland"

kcms/fonts: Fix "Failed to get image from provider" on Wayland

Do not load the preview image on Wayland as the image provider will only return an empty QImage.

kcms/fonts: Fix "the entire line in combobox is not highlighted on Wayland"

Since there is no convenient way to reach the delegate outside of the delegate, we do the following steps instead:

  1. Create an array to store the width properties of items.
  2. When all items are loaded, we call updateMaxWidth to iterate over the array and find the maximum width.
  3. Set doesUseParentWidth to true, so the highlight can be extended for shorter items, which fixes the bug.
Before on Wayland After on Wayland After on X11 (no change)
图片 图片 图片

BUG: 450599 FIXED-IN: 5.25.0

Edited by Fushan Wen

Merge request reports