Previews look ugly in ui dialog

The previews are png images 256x256, and loaded as usual:

    def load_previews(self):
        self.__previews = bpy.utils.previews.new()
        for file in self.imagedir.iterdir():
            img = self.__previews.load(file.name, str(file), 'IMAGE')

The dialog displays them as follows:

    def draw(self, _context):
        self.layout.template_icon_view(self, 'material', show_labels=True, scale=10)
        self.layout.prop(self, 'material')

Here’s how they look in image viewer and in dialog:

What’s going on here?