Slider style tweaks not working after updating to Psychopy v2022.1.2

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2022.1.2
Standard Standalone? (y/n) If not then what?: yes
What are you trying to achieve?: have slider appearance to have style tweak “triangleMarker”

Hello, I have an experiment running locally that includes a slider component that has style as “rating” and style tweak checked for “triangleMarker”. This worked fine in version 2021.2.3. I updated Psychopy to version 2022.1.2, then opened the same experiment. Now the slider marker is a circle, even though the style tweak is still checked for “triangleMarker”.

Any suggestions on how to get the “triangleMarker” to appear when using slider for style “rating”?

Hi, thanks for flagging this up. The developers have been working a lot with the sliders lately and this may have been a bug that was uncaught. I have notified them of this and it will be fixed soon.

Best wishes,
Sue Lynn

I see the bug! I’ve put in a bug fix for it, hopefully we’ll be able to pull it in for the next bug fix release (which should be imminent!).

Essentially, it’s that style tweaks are applied before the style, so the style overrides them when it should be the other way around. So in the meantime you can use a Code :code: component to work around the problem by just saying:

mySlider.styleTweaks = mySlider.styleTweaks

in the Begin Routine tab - as this will then apply the style tweaks again, overriding the style.

Thank you!

FYI: the solution works to bring back the triangle marker, but it is rotated 90º. Checking or unchecking “flip” in the slider “layout” tab does not affect the triangle marker.

Discovered that the default coordinates for the triangle marker are:

self.marker.vertices = [[0, 0], [0.5, 0.5], [0.5, -0.5]]

on line 1075 of This kind of makes sense about why it looks flipped, vertex 1 is 0,0 or where I assume the marker meets the slider line, vertex two is 0.5 units away (to the right) in the x direction and 0.5 units in the y direction away. The third vertex is the same placement in the x direction and negative 0.5 units away in the y direction. Effectively this means the vertices 2 and 3 are above and below the slider line. Honestly though, I do not know which coordinate system Psychopy uses, e.g. where 0,0 is, top left, middle of the screen (?) and whether moving to the top of the screen increases or decreases x,y coordinate as I am just trying to fix an experiment someone else made in Builder. However, I experienced this same bug, and only in this latest version. I tried playing with in-built orientations that are set a few lines up from line 1075 but that did absolutely nothing even if I set them to something nonsensical e.g. 45 degrees. Instead, I used the Begin Routine section of a code component where I am setting other properties like marker size and define a different order of the vertices. Specifically:


and that seems to re-orient the triangle marker correctly.

From Units for the window and stimuli — PsychoPy v2022.1.3 :

For all units, the centre of the screen is represented by coordinates (0,0), negative values mean down/left, positive values mean up/right.

Thanks, the URL is slightly malformed with an additional colon on the end.

Either way the default coordinates for the triangle marker specified in for v 2022.1.2 and 2022.1.3 with no additional rotation lead to a marker that is rotated (fallen over) 90 so that the slider line bisects the middle of the triangle marker. The slider in question for me is oriented horizontal so the ori is set to -90. Assuming -90 means anti-clockwise rotation then this additional orientation rotation seems to do nothing (it should make the marker stand upright relative to the slider line). Is this just the result of the same misordering of styles being applied as I thought that was fixed with the latest 2022.1.3 release?