Issue 241: MTCircularSlider inside a MTBoxLayout is rendered in bottom-left corner
Status:  Done
Owner:
Closed:  Apr 2010
Reported by ilya.cas...@gmail.com, Apr 17, 2010
What steps will reproduce the problem?
1. create a custom widget. put a MTCircularSlider inside a MTBoxLayout
2. change the position of the custom widget
3. run the application

What is the expected output? What do you see instead?
expected output: circular slider inside the boxlayout
output got: circular slider in bottomleft corner, boxlayout at the expected
position

What version of the product are you using? On what operating system?
pymt 0.4, Gentoo GNU/Linux amd64, linux-2.6.32 SMP

Please provide any additional information below.
Apr 17, 2010
#2 ilya.cas...@gmail.com
stripped-down example code for this bug, along with a non-buggy counter-example,
using slider instead of circular-slider.
circularsliderbug.py
824 bytes   View   Download
Apr 19, 2010
#3 ilya.cas...@gmail.com
in pymt/ui/widgets/circularslider.py:

in: def draw(self) and import list:

 change "gx_matrix_identity"
   with "gx_matrix" 

make things a little better.

BUT sliders does not respond to user input (click, drag)

Also: sliders are rendered on the layout borders. should probably draw circles
in widget's center, not in pos (just guessing).

hope this helps.
Apr 19, 2010
#4 ilya.cas...@gmail.com
actually it responds to events only in slider parts that are inside the boxlayout
(check the example file).

Soon i will find a complete fix for this!
Apr 19, 2010
#5 ilya.cas...@gmail.com
partial fix:

if you have, let's say, three circular sliders in a BoxLayout, only the first works,
others don't get events...

here the diff:
pymt_issue_241.diff
3.1 KB   View   Download
Apr 19, 2010
#6 ilya.cas...@gmail.com
can also get the patch with git directly:

http://github.com/imc/pymt/commit/1b923a4d90af40eb67e241e7b07d320578c7de2b

hope this helps.
Apr 19, 2010
#7 ilya.cas...@gmail.com
about Comment #5:

 if the custom widget inherits from MTWidget instead of MTScatterWidget, then the
problem is not seen.
Apr 19, 2010
Project Member #8 txprog
(No comment was entered for this change.)
Status: Accepted
Owner: txprog
Apr 19, 2010
Project Member #9 txprog
all fixed
Status: Done
Labels: Milestone-0.4.1 Component-Core
Jul 2, 2010
Project Member #10 txprog
(No comment was entered for this change.)
Labels: Milestone-0.5