[MPlayer-dev-eng] [PATCH] GUI: Activate potmeter

Ingo Brückl ib at wupperonline.de
Fri Feb 28 13:22:03 CET 2014


Hans-Dieter Kosch wrote on Fri, 28 Feb 2014 04:26:31 +0100:

> Ingo Brückl wrote:
>> Hans-Dieter Kosch wrote on Wed, 19 Feb 2014 00:36:59 +0100:
>>
>>> Ingo Brückl wrote:
>>>> Hans-Dieter Kosch wrote on Sun, 16 Feb 2014 23:04:35 +0100:
>>>>
>>>>> The 'pressed' state of a 'potmeter' item is not initialised.
>>>> Agreed.
>>>>
>>>>> By default it's 0 ('btnDisabled'), and the item is inactive.
>>>> A potmeter doesn't have a btnDisabled state. Actually,
>>>> the pressed state of a potmeter is irrelevant, because
>>>> they cannot be pressed.
>>>>
>>> Cf. gui/skin/skin.c: line 619: in function item_hpotmeter():
>>>      item->pressed   = btnReleased;
>>
>> I know, but you can't compare to a hpotmeter. A hpotmeter has a button, a
>> potmeter doesn't.

> Ok, so far. But the form of a potmeter - horizontal, vertical or round -
> shouldn't have influence on its operation, should it?

You don't seem to understand, that (by design) a potmeter isn't a round
version of a hpotmeter. A potmeter is (by design) something like a graphic
label. (And again, don't blame me, I didn't do the design.)

So usually a skin adds something that is user controllable to a potmeter
item - a button (skin Abyss for volume) or a hpotmeter (skin Blue for movie
position).

(Some skins don't do so though, and I don't know whether they are badly
designed or whether the GUI behaved differently in the early stages.)

> Can the round knob image of a pot not also be formally regarded as a
> button?

Sure. It even should *have* a button (image). Think of a round knob with a
LED (green if enabled, red if disabled).

> The point of confusion seems to me, that a pot basically can't have a
> 'pressed' state like a button,

A [hv]potmeter is definied to *have* a button - a potmeter isn't, please see
the skin documentation.

>> Ok. So you want a potmeter to be shiftable by the mouse?

> That would be intuitive from user's perspective, just like other elements
> on the skin can be controlled by the mouse.

But, as mentioned, a potmeter isn't supposed to be user controllable - just
like a label isn't.

>> Did you notice that you already can do so with the Blue skin you were
>> referring to while a video is playing? (So where do you miss mouse
>> shiftability?)

> Hmm, I can't reproduce. Even while playing a video, the window moves
> instead of the volume pot rotating when pressing and dragging the mouse
> over the pot

The Blue skin (you were referring to) doesn't have a volume potmeter (nor
anything that rotates). It has only one potmeter (evSetMoviePosition, the
blue dots at the bottom of the info area) accompanied by a hpotmeter (for
a reason mentioned above).

And, btw, currently a (evSetMoviePosition) potmeter (and only this one) is
user controllable during playback due to a programming bug.

>> Please keep in mind that (currently) potmeters aren't designed for user
>> action.

> Then, they'd make no sense appearing on the skin

Actually they do make sense. Think of them as glabel (graphic label) and see
the volume control (potmeter and hpotmeter) in skin Clearlooks.

I'm not quite sure whether I'd like the potmeter there to be controllable.

What doesn't seem to make sense is that a potmeter is defined to generate a
message.

> BTW. If you could decide to make it mouse-controllable by this patch or
> similar, then my second patch sent "Implement a true rotary potmeter" would
> yield a really beautyful pot like seen on other players...

Yes, but that's a whole other story.

The make this long potmeter story short:

* Currently a potmeter is more of a graphic label, but unfortunately it is
  named differently. I'm not quite sure what to do about it.

* Renaming existing items and such is always a big problem and often not
  possible in order to remain compatible.

* If we would change something with the potmeter we'd have to check at least
  all skins on the website (and to hope that there aren't other skins out
  there using potmeters differently).

* As it stands at the moment I would probably name a round potentiometer
  rpotmeter with the same parameters like [hv]potmeter. But a forth one
  wouldn't simplify the potentiometer matters.

I have to think about it.

Ingo


More information about the MPlayer-dev-eng mailing list