spyder-ide / qtawesome

Iconic fonts in PyQt and PySide applications
https://qtawesome.readthedocs.io/en/latest/index.html
MIT License
811 stars 107 forks source link

Tremulous spinning icons #39

Closed termim closed 2 years ago

termim commented 8 years ago

I noticed that all spinning icons do shake a little while rotating. Is there a way to make it smooth as on the original web page?

SylvainCorlay commented 8 years ago

Did you notice this on the animated gif or while running the demo?

termim commented 8 years ago

While running the demo on linux

On Mon, Feb 8, 2016 at 6:27 PM, Sylvain Corlay notifications@github.com wrote:

Did you notice this on the animated gif or while running the demo?

— Reply to this email directly or view it on GitHub https://github.com/spyder-ide/qtawesome/issues/39#issuecomment-181620681 .

Mikhail Terekhov

boredstiff commented 7 years ago

Hi, I'm still seeing this issue, running 0.4.4 on Windows.

        self.loading_button = QtGui.QPushButton()
        self.loading_icon = qtawesome.icon(
            'fa.spinner', animation=qtawesome.Spin(self.loading_button))
        self.loading_button.setIcon(self.loading_icon)

Using this, the spinning icons does indeed spin, but shakes while it's rotating - kind of a bummer, because this was the only icon I needed from the package.

Is there anything that has been done to address this?

boredstiff commented 7 years ago

shaking

It actually shakes faster than this, my recording was only recording at 15fps.

It also isn't just that single icon (fa.spinner), it's any icon.

doudz commented 5 years ago

I have the same problem on Ubuntu, I think it has something to do with alignment

https://github.com/spyder-ide/qtawesome/blob/master/qtawesome/iconic_font.py#L162

Because if I replace painter.drawText(rect, Qt.AlignCenter | Qt.AlignVCenter, char) by painter.drawText(rect, 0, char) icons are not shaking anymore but rotate eccentric

I suppose somewhere there's a rounding or something treats as int instead of float

as a workaround I increased the rotating speed (step=10) so the shaking is not visible

goanpeca commented 4 years ago

as a workaround I increased the rotating speed (step=10) so the shaking is not visible

This is the only solution I can see so far :-\

Looks ok on Mac

listyque commented 4 years ago

What if render it larger and downscale icon? Render 128*128 / 4 The only reason animation is useless - shaking and buggy looks