UCI Styles
You can install custom Cascading Style Sheet (.css) files to a design, and then apply a selected style to a user control interface (UCI). This makes it easy to apply the same style to multiple UCI elements. It also allows for UCI design uniformity throughout an organization, since the same styles can be used for multiple designs.
Use this procedure for getting started with creating your own styles.
Note: Styles may also be available for download from Q-SYS Asset Manager (Tools > Show Asset Manager).
- Q-SYS Designer checks the following directory for .css files to install:
\Users\user-name\Documents\QSC\Q-SYS Designer\Styles
. Within this directory, create a folder for each style. The folder name is used for the style name in Q-SYS Designer. - Create a file called
style.css
and place it in the folder for your style.- Use a common code authoring tool such as Visual Studio Code to write your style.
- Refer to Supported CSS Properties to see what selectors are compatible with Q-SYS UCI design graphic and control elements. Q-SYS supports common CSS selectors.
- If your style uses images or custom fonts, place them in the folder containing your style. Ensure that your .css file refers to the proper subfolders for referenced files.
- Install the style to a design. See Managing UCI Styles.
- Apply the style to a UCI. See Applying and Updating UCI Styles.
Tip: Because style .css files are installed to the design, if you share a design containing installed styles with someone else, that person will also see those styles.
Installing New Styles to a Design
- Place the .css file and any supporting image files into the Styles folder. See Getting Started: Creating Styles.
- In Q-SYS Designer, create or open a design file.
- Click Tools > Manage UCI Styles.
- From the Available list, select the style name, and then click Install Style.
- Close the Manage UCI Styles window.
The installed style is now available for selection in your UCI. See Applying and Updating UCI Styles.
Saving Styles from a Design
If a design contains a styles file that is not currently on your local disk, you can save it from the design. You can then edit the file.
- Click Tools > Manage UCI Styles.
- From the Installed list, select the style name, and then click . The style is now saved to the Styles folder on-disk.
Note: Referenced image files are not saved.
Removing Styles from a Design
- In Q-SYS Designer, create or open a design file.
- Click Tools > Manage UCI Styles.
- From the Installed list, select the style name, and then click .
- Close the Manage UCI Styles window.
Once you have installed a UCI style file to a design, you can then apply it to a UCI. Applied styles take precedence over individual graphic and control properties in Designer.
- With your design file open in Q-SYS Designer, select User Control Interfaces in the left pane.
- Select your UCI name.
- In the User Control Interface Properties (right side pane), select a Style from the drop-down menu.
- Optionally, use the CSS Class Name property to adjust the assigned classes for a UCI element (button, fader, text box, etc.). An element can belong to as many CSS classes as needed to provide the desired styling.
Tip: Click to access the Manage UCI Styles window from the UCI Properties pane.
Updating Styles
If you modify a styles .css file – either via an update from Q-SYS Asset Manager or in a code editor – Q-SYS Designer detects any changes and prompts you to update the style in your design.
You can modify a .css file whether your design is open in Q-SYS Designer or not. To allow Q-SYS Designer to automatically update styles while your design is open (without prompting), click Tools > Auto Update Styles.
Note: The Auto Update Styles option is not saved with the design. The option reverts to disabled the next time you open your design file.
The following tables indicate what selectors are supported for specific UCI graphic and control elements.
= Supported
Graphics
Property | Page | Textblock | Groupbox | Header | Image | Polygon |
---|---|---|---|---|---|---|
background |
|
|
|
|
||
background-color |
|
|
|
|
||
background-image4 |
|
|
|
|
||
background-position |
|
|
|
|
||
background-size |
|
|
|
|
||
border5 |
|
|
||||
border-width |
|
|
||||
border-* |
|
|
||||
border-*-width5 |
|
|
||||
border-*-color |
|
|
||||
border-radius |
|
|
||||
color |
|
|
|
|||
content |
|
|
|
|||
font-family |
|
|
|
|||
font-size5 |
|
|
|
|||
margin |
|
|
||||
opacity |
|
|
|
|
||
padding |
|
|||||
text-align |
|
|
|
|||
text-transform |
|
|
|
|||
vertical-align |
|
|||||
-qsc-font-style3 |
|
|
|
1. Only supports single border color and thickness (uses left).
2. Only supports single corner radius (uses top left).
3. Specific to QSC, and uses the same values as the Font Style property drop-down – Bold, Italic, Bold Italic, etc.
4. Only supports url()
and linear-gradient()
background-images.
5. Supports viewport relative sizes. See Setting Viewport Relative Sizes for example usage.
Controls
Button | Textbox | Knob | Led | Fader | Meter | Combobox | Listbox | |
---|---|---|---|---|---|---|---|---|
background |
|
|
|
|
|
|
||
background-color |
|
|
|
|
|
|
|
|
background-image4 |
|
|
|
|
|
|
||
background-position |
|
|
|
|
|
|
||
background-size |
|
|
|
|
|
|
||
border5 |
|
|
|
|
|
|
||
border-width |
|
|
|
|
|
|
||
border-* |
|
|
|
|
|
|
||
border-*-width5 |
|
|
|
|
|
|
||
border-*-color |
|
|
|
|
|
|
||
border-radius |
|
|
|
|
|
|
||
color |
|
|
|
|
|
|
||
content |
|
|
||||||
font-family |
|
|
|
|
|
|||
font-size5 |
|
|
|
|
|
|||
margin |
|
|
|
|
|
|
||
opacity |
|
|
|
|
|
|
|
|
padding |
|
|
||||||
text-align |
|
|
|
|
|
|
||
text-transform |
|
|
|
|
||||
vertical-align |
|
|
|
|
||||
-qsc-font-style |
|
|
|
|
|
|||
-qsc-icon6 |
|
|
||||||
-qsc-icon-color6 |
|
|
||||||
-qsc-icon-font6 |
|
|
||||||
-qsc-icon-align6 |
|
|
1. Only supports color (not images) on the background.
2. Only supports single border color and thickness (uses left).
3. Only supports single corner radius (uses top left).
4. Only supports url()
and linear-gradient()
background-images.
5. Supports viewport relative sizes. See Setting Viewport Relative Sizes for example usage.
6. See Referencing Icon Fonts for details and examples.
Create a new folder within the \Users\user-name\Documents\QSC\Q-SYS Designer\Styles
folder on your PC. This folder name becomes the style name in Designer. Create a file called style.css
and place it and any images or custom fonts you plan to reference in this folder.
Use a text or code editor to author the style. This example shows Visual Studio Code.
Note: Click here to see the CSS content shown in this video.
Go to Tools > Manage UCI Styles to install the style.
When you select the installed style, the elements of the UCI receive the styling from the style.css file.
After you apply the style, you can optionally fine-tune what CSS classes are applied to each element in the UCI. Select a UCI element and use the CSS Class Name property to assign one or more classes. In this example, the fader already has the GainLevelFader class assigned, which sets its color and border width. However, the user desires to use the same background color as the knob, so he selects the GainLevelKnob class as well.
Defined CSS style properties override the same properties in Designer. For example, in this style.css file, all buttons are defined to use a blue background. Therefore, if a button is set to use red in the Designer properties, it is overridden by the applied style and therefore uses blue. Note, however, that because there is no font size defined in the style, the size specified in Designer is used.
button{
background: Blue;
font-family: Lato;
font-face: Bold;
}
In this example, the On state of the button is set with button:value(1). The code sets the On state color for all buttons to be red:
button:value(1){
background: Red;
}
To apply styling to a subset of items (for example, source buttons), you first define a class in the CSS document. The example code below adds a class for preset buttons and sets the buttons to be green when Off and orange when On. Note that you can use names, RGB values, or RGBA values when defining colors.
.source{
background: Green;
}
.souce:value(1){
background: rgb(255, 174, 0);
}
Use the :pressed
selector to define a style specific to a UCI button that has been pressed, and optionally define whether that style is used depending on the button's value.
Here's the definition for a button with an unpressed color of gray and a pressed color of red:
.myButton {
background-color: gray;
}
.myButton:pressed {
background-color: red;
}
And here's a definition for a pressed color of green but only if the button is pressed and has a value of 1:
.myButton:pressed:value(1) {
background-color: green;
}
Reference images by providing a path to the image file as the background-image property – for example, for buttons.
.pc{
background-image: url(images/pc.png);
}
Reference custom fonts in your CSS file using the @font-face
rule. Make sure to reference the location where your fonts are stored in relation to your CSS file. For example, here is a reference to a font stored in a fonts
subfolder at the same level as the CSS file:
@font-face {
font-family: "My Fancy Font";
src: url( fonts/fancyfont.ttf );
}
textbox {
font-family: "My Fancy Font";
}
Icon fonts are icons that you can customize in CSS for color, size, and style. Two built-in fonts are included – foundation and material – but you can also reference custom font icons in the same way as custom fonts.
Icon Font Properties
Q-SYS supports icon fonts with these QSC-specific CSS properties. Refer to the Supported CSS Properties section for compatibility with various Q-SYS control types.
Property |
Description |
---|---|
-qsc-icon |
The string to use for the icon font.
Tip: Foundation icon names can be found at zurb.com. Material icon names can be found at material.io. |
-qsc-icon-color |
The CSS-based color to use for drawing the icon – for example: |
-qsc-icon-font |
The icon font to use, which can be either be |
-qsc-icon-align |
Alignment can be either |
Example
@font-face {
font-family: dash;
src: url(dashicons.ttf);
}
/* custom icon */
.dash-friends {
-qsc-icon-font: dash;
-qsc-icon: "\f167";
-qsc-icon-color: green;
}
/* foundation */
.foundation-blind {
-qsc-icon: blind
}
/* material */
.material-brightness-1 {
-qsc-icon: "brightness_1";
-qsc-icon-font: material;
-qsc-icon-color: yellow;
-qsc-icon-align: right;
}
Some properties (for example, font-size
) allow you to define them as a percentage of the containing object's width or height using these values:
-
vw
- percentage of width -
vh
- percentage of height -
vmin
- percentage of width or height, whichever is smaller -
vmax
- percentage of width or height, whichever is larger
For example:
.someclass {
font-size: 90vh; // font size will be 90% of height
}
To see what properties support viewport relative sizes, refer to the table footnotes in the Supported CSS Properties section.
Q-SYS supports CSS variables in the :root
selector. Variables can define multiple terms, and each must be prefixed with a --
.
:root {
--fancy-color: yellow;
--fancy-border-color: chartreuse;
--fancy-border: 30px orange;
}
Use the var()
function to refer to the variable definition in your style:
.my-style {
color: var(--fancy-color);
border: var(--fancy-border);
border-bottom: 5px var(--fancy-color, orange);
}
Tip: You can define a fallback value (after the comma) to be used if the variable with the given name hasn't been defined, which is useful when including other CSS files. In the above example, the fallback value for the border-bottom color is orange.
You can use @import
to import a style into another style. You simply reference the style to import by its name. Note that:
-
Imported styles must already be installed in the Q-SYS design.
-
After import, the available classes are those from the imported style combined with those from the base style.
-
Selector declarations are combined. That is, if the imported style and base style both define a selector, the end result is a combination of both, with the imported selector definition ordered first and the base second.
-
Variables are also combined in the same way as selectors.
-
Images and fonts referenced in imported styles are relative to that style. If you want to reference an imported image in the base style, you must use a relative URL
For example, here is an existing CSS style called "Dash" that we want to import. The Dash style includes a font and image:
@font-face {
font-family: dash;
src: url(dashicons.ttf);
}
:root {
--var-1 : blue;
--var-2 : 3px red;
}
.test {
border: 10px chartreuse;
background-image: url("core_blue.png");
}
.dashicons-admin-appearance {
-qsc-icon-font: dash;
-qsc-icon: "\f100";
}
.dashicons-admin-collapse {
-qsc-icon-font: dash;
-qsc-icon: "\f148";
}
And here is another style (the "base" style) importing the Dash style:
@import url("Dash");
:root {
--base-var: green;
}
page {
background: linear-gradient(var(--base-var), rgb(54, 53, 53));
border: var(--var-2);
}
.ref-style-image {
background: url("../Dash/core_blue.png");
}
.dashicons-admin-collapse {
-qsc-icon-color: chartreuse;
}
This section contains a list of available CSS classes and their intended uses for UCI styles provided by QSC.
Teams
Use this style for Q-SYS room control UCIs displayed on Microsoft Teams Rooms consoles. For more information, see Microsoft Teams Room (MTR).
CSS Class Name | Description/Usage | Example |
---|---|---|
buttonprimary |
Intended for buttons with primary purpose – for example, function toggles. Fill is light purple when on and dark purple when off. |
|
buttonsecondary |
Intended for buttons with secondary purpose – for example, mode selection. Fill is light purple when on and transparent when off. |
|
buttonsnapshot |
Intended for snapshot buttons – for example, camera position presets. Fill is light purple when a snapshot is saved and dark purple when not saved. |
|
icondown iconup iconleft iconright |
Intended for directional buttons – for example, camera position control. |
|
icondownbar iconupbar |
Intended for directional buttons – for example, room temperature control. |
|
iconeye |
Intended for buttons for hiding visibility – for example, entering camera privacy mode. |
|
iconhome |
Intended for buttons for returning to a home position – for example, a camera's home position. |
|
iconpower |
Intended for power buttons. |
|
iconvoldown iconvolup iconvoloff iconvolmute |
Intended for volume control buttons. |
|
iconzoomin iconzoomout |
Intended for camera zoom controls. |
|
justifycenter justifyleft justifyright |
Use the justify tags in combination with textbodydisplay, textheadingdisplay, textlabeldisplay (shown), or texttitledisplay. |
|
textbody |
Body text with a left justify. |
|
textbodydisplay |
Body text with a default center justify. Optionally use in combination with justifyleft or justifyright. |
|
textboxfader |
Text box with purple fill intended for fader labels. Center justify. |
|
textheading |
Heading text with left justify. |
|
textheadingdisplay |
Heading text with a default center justify. Optionally use in combination with justifyleft or justifyright. |
|
textlabel |
Label text with left justify. |
|
textlabeldisplay |
Label text with a default center justify. Optionally use in combination with justifyleft or justifyright. |
|
texttitle |
Title text with left justify. |
|
texttitledisplay |
Title text with a default center justify. Optionally use in combination with justifyleft or justifyright. |