Color links and ports according to their formats

Format params for links and ports are now being watched for in the pipewire connection code.

The parsed media type is then set on the port widget / link object
and they are colored accordingly.

For ports, which were already colored before, this new method of determining the media type
should be more reliable and accurate as this uses the real Format/EnumFormat
params instead of parsing optional properties.
This commit is contained in:
Tom A. Wagner
2023-07-30 12:09:08 +02:00
parent ba73d8cdcc
commit 7f754b207c
8 changed files with 362 additions and 148 deletions

View File

@@ -15,23 +15,23 @@
SPDX-License-Identifier: GPL-3.0-only
*/
@define-color audio rgb(50,100,240);
@define-color video rgb(200,200,0);
@define-color midi rgb(200,0,50);
@define-color graphview-link #808080;
@define-color media-type-audio rgb( 50, 100, 240);
@define-color media-type-video rgb(200, 200, 0);
@define-color media-type-midi rgb(200, 0, 50);
@define-color media-type-unknown rgb(128, 128, 128);
.audio {
background: @audio;
background: @media-type-audio;
color: black;
}
.video {
background: @video;
background: @media-type-video;
color: black;
}
.midi {
background: @midi;
background: @media-type-midi;
color: black;
}