Add possibility of indicator lights in the skin.

Bug #664610 reported by RJ Skerry-Ryan
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
RJ Skerry-Ryan
1.10
Won't Fix
Wishlist
RJ Skerry-Ryan
1.11
Won't Fix
Wishlist
RJ Skerry-Ryan
1.9
Won't Fix
Wishlist
RJ Skerry-Ryan
2.0
Fix Released
Wishlist
RJ Skerry-Ryan

Bug Description

We should add indicator lights for

- Shoutcast connected or disconnected
- Recording active or inactive
- Vinyl Control active or inactive
- Soundcard output active or inactive

This could simply be done by making Control's for each one of these conditions, and then in the skin specifying a 2-state <Display> section connected to whichever control.

Tags: skin
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Could we stick these in the menu bar for the short term? Just like letters spaced away from the rest of the menus...S, R, V, O or something.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
assignee: RJ Ryan (rryan) → nobody
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Trunk has some new skin features that allow you to hide or show items in the skin based on the value of a control. I'm going to make sure that each of these features (mic, shoutcast, recording, etc.) all have a sane CO that can be used to indicate if they are on or off.

Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
RJ Skerry-Ryan (rryan)
Changed in mixxx:
assignee: RJ Ryan (rryan) → nobody
RJ Skerry-Ryan (rryan)
Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Recording, shoutcast, and soundcards now all have status controls:

[Recording],status
[Shoutcast],status
[SoundManager],status

I renamed [Master],Record to [Recording],status and [Master],toggle_recording to [Recording],toggle_recording to make things more organized.

The 'status' controls have 3 values:
0 -- disconnected / off
1 -- connecting / enabling
2 -- connected / enabled

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

VinylControl is a little different and has pre-existing enabled controls:

[Channel1],vinylcontrol_enabled
[Channel2],vinylcontrol_enabled

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Here's how to map a push-button like the recording button:

<PushButton>
      <Tooltip>Record&#10;Click to start a new recording.&#10;</Tooltip>
      <Style>QToolTip { color: #221E1F;}
      </Style>
      <NumberStates>3</NumberStates>
      <LeftClickIsPushButton>true</LeftClickIsPushButton>
      <RightClickIsPushButton>true</RightClickIsPushButton>
      <State>
      <!-- RECORD OFF -->
       <Number>0</Number>
       <Pressed>btn_record_over.png</Pressed>
       <Unpressed>btn_record.png</Unpressed>
      </State>
      <State>
      <!-- RECORD READY-->
       <Number>1</Number>
       <Pressed>btn_record.png</Pressed>
       <Unpressed>btn_record_over.png</Unpressed>
      </State>
      <State>
       <!-- RECORD ON-->
       <Number>2</Number>
       <Pressed>btn_record.png</Pressed>
       <Unpressed>btn_record_over.png</Unpressed>
      </State>
      <Pos>199,114</Pos>
      <Connection>
       <ConfigKey>[Recording],toggle_recording</ConfigKey>
       <EmitOnPressAndRelease>true</EmitOnPressAndRelease>
       <ButtonState>LeftButton</ButtonState>
       <ConnectValueToWidget>false</ConnectValueToWidget>
      </Connection>
      <Connection>
       <ConfigKey>[Recording],status</ConfigKey>
       <ConnectValueFromWidget>false</ConnectValueFromWidget>
      </Connection>
     </PushButton>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Oops, here's a slightly better version of the <State> sections that doesn't flicker when you press it:

      <State>
      <!-- RECORD OFF -->
       <Number>0</Number>
       <Pressed>btn_record_over.png</Pressed>
       <Unpressed>btn_record.png</Unpressed>
      </State>
      <State>
      <!-- RECORD READY-->
       <Number>1</Number>
       <Pressed>btn_record_over.png</Pressed>
       <Unpressed>btn_record_over.png</Unpressed>
      </State>
      <State>
       <!-- RECORD ON-->
       <Number>2</Number>
       <Pressed>btn_record_over.png</Pressed>
       <Unpressed>btn_record_over.png</Unpressed>
      </State>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

And here's how to just map an indicator based on one of these status controls (of course with appropriate status PNGs)

                                        <StatusLight>
                                          <TooltipId>soundmanager_status</TooltipId>
                                          <Style></Style>
                                          <NumberPos>3</NumberPos>
                                          <PathStatusLight>btn_record.png</PathStatusLight>
                                          <PathStatusLight2>btn_cue1_over.png</PathStatusLight2>
                                          <PathStatusLight3>btn_record_over.png</PathStatusLight3>
                                          <Pos>7,311</Pos>
                                          <Connection>
                                            <ConfigKey>[SoundManager],status</ConfigKey>
                                          </Connection>
                                        </StatusLight>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Ignore that <StatusLight> block. It doesn't actually work.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hm, ok so [SoundManager],status can't work for some very annoying reasons. Right now ControlObjects don't sync unless the engine is processing, so if no soundcards are connected then our control-set for the disconnected state won't propagate to the GUI.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Based on all the certified skins, I think our <StatusLight> handling should change.

WStatusLight always paints <PathBack> no matter what the widget value is. If the widget value is greater than 0, it paints <PathBack> and then the current image for the widget value (for widget value X, paints <PathStatusLightX>. <PathStatusLight> is implicitly <PathStatusLight1>)

This seems bad because if you want to make a status light with it where the status light is mostly transparent except for the indicator, you have to make the image for value X completely over-write the pixels you wrote in PathBack. From a skin-designer perspective this seems to limit the possible icon choices you have.

I just committed a change that will still support <PathBack> and <PathStatusLight> but they are just aliases for <PathStatusLight0> and <PathStatusLight1>. <PathStatusLight0> is no longer always be drawn -- it's only drawn when the widget value is 0.

Jus -- if you want I can make <PathBack> not an alias for <PathStatusLight0> and instead if provided be a background that is drawn no matter what before drawing the <PathStatusLightX> image. I wasn't sure if this is useful since I think that most of the stuff you make is transparent.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Based on the above change, if you wanted to map shoutcast-status:

<StatusLight>
...
<NumberPos>3</NumberPos>
<PathStatusLight>shoutcast_status_disconnected.png</PathStatusLight>
<PathStatusLight2>shoutcast_status_connecting.png</PathStatusLight2>
<PathStatusLight3>shoutcast_status_connected.png</PathStatusLight3>
..
<Connection>
  <ConfigKey>[Shoutcast],status</ConfigKey>
</Connection>
</StatusLight>

Revision history for this message
mutil (mutil) wrote :

I have added indicator lights not to the skin, but to menu (to a status bar inside a layout with the menu bar, to be more precise).
Linked a branch to test it and attaching a screenshot to see what it looks like.

Revision history for this message
jus (jus) wrote :

Nice stuff again mutil.
AFAIK the menubar as show in your screenshot is only available on Linux. We might think about a solution applicable for all supported OS.

Tested your current branch with MacOSX and found it breaks the Mixxx menu and displays an extra bar instead (see screenshot).

At least on MacOS the is no separate application menubar, all menu options are displayed in the OS default top bar. The top bar menues change apparence depending on what application has focus. You can only hide the top bar when switching to fullscreen in Mixxx, which is the default OS behaviour.

Just a quick thought. Cant we use a notification area on the bottom of the application window? We could you that for all kind of additional stuff later, e.g. show/hide cover widget, split library pane etc.

Revision history for this message
mutil (mutil) wrote :

Hi Jus, thanks for the feedback.
I am not familiar with Macs so excuse my ignorance. From what I understood there is no way to have this cross-platform. And unfortunately, I can't explore this any further as I don't have any available machines for testing in different platforms.
But suppose we could overcome the menu not showing(I suppose F10[Show/Hide menu] does nothing as well), would it be ok to have this extra bar only in native menu platforms? I am not in favor of having an extra notification bar for every situation, as in netbooks and smaller devices the vertical space is expensive and menu bar is already overhead.

The only other feasible solution I can think of, is implementing indicators in skins as originally proposed, but requires more work and small skins are already somewhat dense. But overall it will be worth the effort.

Revision history for this message
jus (jus) wrote :

I agree with mutil that it is worth implementing the indicators directly in the skins. The content from the extra bar in the example can easily integrate in a notification bar inside the application widget .

With careful planning, the effort needed is comprehensible. For 1.12 the number of default skins should be reduced anyway.
Better 1-2 fully supported skins than X halve baked ones.

@RJ
When trying your example from #11 for "[Recording],status" , the default state graphic "0 -- disconnected / off" is not displayed.
It worked with the following :
<StatusLight>
<NumberPos>3</NumberPos>
<PathStatusLight0>foo_0.png</PathStatusLight0>
<PathStatusLight1>foo_1.png</PathStatusLight1>
<PathStatusLight2>foo_2.png</PathStatusLight2>
<Connection>
  <ConfigKey>[Recording],status</ConfigKey>
</Connection>
</StatusLight>

jus (jus)
tags: added: skin
Revision history for this message
Be (be.ing) wrote :

I don't know when this was fixed, but some time between 2012 and now these indicators were added to skins.

Changed in mixxx:
status: Confirmed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5603

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.