[MPlayer-dev-eng] [PATCH] GUI: Potmeter button corrections

Hans-Dieter Kosch hdkosch at kabelbw.de
Mon Mar 24 01:20:57 CET 2014

Hi Ingo,

while coding the rpotmeter, I came across the following:


When rendering the [hv]potmeter, the button width/height is regarded, so that 
the button doesn't exceed the potmeter edges. However, the counterpart in the 
mouse handling doesn't do the exact inverse calculation. The button is drifting 
under the mouse pointer from its one edge to its other when moving it from one 
end of the potmeter to the other. Only in the middle of the pot, the button is 
centered under the mouse.

The attached 'potmeter_button_adjust.patch' corrects the mouse calculations to 
keep the button always centered under the mouse (like one might expect). The 
coming rpotmeter button will have the same behaviour (inherent by design).


The WIN32 GUI checks that the rendered potmeter button doesn't exceed the 
bounds. This seems not necessary as the item value is already limited. The GTK 
GUI doesn't do this check neither.

The attached 'potmeter_button_cleanup.patch' removes those checks, simplifying 
the code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: potmeter_button_adjust.patch
Type: text/x-patch
Size: 4177 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140324/992a4d4b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: potmeter_button_cleanup.patch
Type: text/x-patch
Size: 1347 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140324/992a4d4b/attachment-0001.bin>

More information about the MPlayer-dev-eng mailing list