mbasaglia / Qt-Color-Widgets

Color wheel widget and dialog for Qt
147 stars 54 forks source link

Gradient slider handle position on macOS #39

Closed callaa closed 6 years ago

callaa commented 6 years ago

With the latest macOS and Qt versions, the gradient slider handle is always rendered at the left edge of the widget. (I'm not sure if updating macOS or Qt is relevant, but I just recently did both and just noticed this bug.)

Removing these lines seems to fix the bug (gradient_slider.cpp, end of GradientSlider::paintEvent):

opt_slider.rect = style()->subControlRect(QStyle::CC_Slider,&opt_slider,
                                          QStyle::SC_SliderHandle,this);

I've tested this change on macOS (High Sierra), Linux (with Breeze and Fusion styles) and Windows. It does not seem to have any adverse effects. I haven't been able to test it on older macOS versions, so I don't know if it breaks something there.

mbasaglia commented 6 years ago

shrugs it would seem you need that assignment but without it works for me so I'm just removing it