[MPlayer-dev-eng] [PATCH] GUI: Potmeter button corrections
Ingo Brückl
ib at wupperonline.de
Mon Mar 31 11:10:14 CEST 2014
Hans-Dieter Kosch wrote on Sun, 30 Mar 2014 01:51:46 +0100:
> Ingo Brückl wrote:
>> I was just going to commit this patch when I realized that this will
>> cause a very unpleasant issue.
>>
>> With a centered button all values from 0 to buttonsize/2 percent and
>> 100-buttonsize/2 to 100 percent will end up in the same drawn button
>> position, or - to put it another way - dragging the button to the edges
>> will result in value changes but no button movement (for the width of
>> buttonsize/2).
> Yes, I see. It's due to the min/max constraints in rendering.
> The tie is that mouse handling and rendering are dependent on each other to
> obtain a correct visual feedback. Both have to regard the item dimensions
> and have to do matching forward/reverse calculations. Both do regard the
> potmeter size, but only rendering regards the potmeter's button size, while
> mouse does not. This is what my suggested patch aims to fix.
A correct fix would be to make the middle of the button the representative
for the item's value, but that would result in a button that would stick out
at the edges half a button size. While this is exactly what a real poti does,
this unfortunately never seemed to be the design plan for the GUI and thus no
skin is prepared to handle it.
So yes, agreed, there is no correct visual feedback regarding a real life
poti, but I never had the feeling (as a GUI user) that the potmeter button
behaves strangely or incorrect.
Ingo
More information about the MPlayer-dev-eng
mailing list