UI: Source Toolbar

The source toolbar allows quick and easy access to properties and
filers, and shows common properties/features of a source type.  For
example, when you select a media source, VLC source, or the slideshow
source, you'll get media controls to control playback of the media.  If
you select a text source you can edit the font, color, or text if
applicable.  Or if you select a capture source, you can select the
display/window/etc to capture for that source.

If the source toolbar is not desired and is viewed as taking up valuable
space in the window, it can be disabled via the view menu.

Co-authored-by: Clayton Groeneveld <claytong1214@gmail.com>
Co-authored-by: Jim <obs.jim@gmail.com>
This commit is contained in:
Colin Edwards
2018-08-23 20:43:44 -05:00
committed by jp9000
parent 37767b6746
commit fddbbe259d
47 changed files with 2872 additions and 7 deletions

View File

@@ -311,6 +311,24 @@ QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal, QScrollBa
color: none;
}
/* Source Context */
#contextContainer {
min-height: 40px;
max-height: 40px;
}
#contextContainer QPushButton[themeID2=contextBarButton] {
padding: 0px;
}
QPushButton#sourcePropertiesButton {
qproperty-icon: url(./Dark/settings/general.svg);
}
QPushButton#sourceFiltersButton {
qproperty-icon: url(./Dark/filter.svg);
}
/* Scenes and Sources toolbar */
QToolBar {
@@ -1108,3 +1126,29 @@ QSlider::handle:horizontal[themeID="tBarSlider"] {
height: 28px;
margin: -28px 0px;
}
/* Media icons */
* [themeID="playIcon"] {
qproperty-icon: url(./Dark/media/media_play.svg);
}
* [themeID="pauseIcon"] {
qproperty-icon: url(./Dark/media/media_pause.svg);
}
* [themeID="restartIcon"] {
qproperty-icon: url(./Dark/media/media_restart.svg);
}
* [themeID="stopIcon"] {
qproperty-icon: url(./Dark/media/media_stop.svg);
}
* [themeID="nextIcon"] {
qproperty-icon: url(./Dark/media/media_next.svg);
}
* [themeID="previousIcon"] {
qproperty-icon: url(./Dark/media/media_previous.svg);
}

View File

@@ -220,6 +220,19 @@ QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal, QScrollBa
color: none;
}
/* Source Context */
#contextContainer QPushButton[themeID2=contextBarButton] {
padding: 3px;
margin: 0px;
}
#contextContainer QPushButton#sourcePropertiesButton {
qproperty-icon: url(./Dark/settings/general.svg);
}
#contextContainer QPushButton#sourceFiltersButton {
qproperty-icon: url(./Dark/filter.svg);
}
/* Scenes and Sources toolbar */
@@ -839,3 +852,29 @@ QSlider::handle:horizontal[themeID="tBarSlider"] {
height: 24px;
margin: -24px 0px;
}
/* Media icons */
* [themeID="playIcon"] {
qproperty-icon: url(./Dark/media/media_play.svg);
}
* [themeID="pauseIcon"] {
qproperty-icon: url(./Dark/media/media_pause.svg);
}
* [themeID="restartIcon"] {
qproperty-icon: url(./Dark/media/media_restart.svg);
}
* [themeID="stopIcon"] {
qproperty-icon: url(./Dark/media/media_stop.svg);
}
* [themeID="nextIcon"] {
qproperty-icon: url(./Dark/media/media_next.svg);
}
* [themeID="previousIcon"] {
qproperty-icon: url(./Dark/media/media_previous.svg);
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="185.25 184.25 100 100" enable-background="new 185.25 184.25 100 100" xml:space="preserve"><g><g><g><path fill="#FFFFFF" d="M204.608,244.706l11.525,11.525c2.041,0.365,4.142,0.556,6.288,0.556c1.898,0,3.761-0.151,5.579-0.438l-22.379-22.38 c0.704-2.995,1.747-5.863,3.092-8.559l28.263,28.263c2.623-1.181,5.076-2.672,7.314-4.426l-30.99-30.99 c1.723-2.143,3.667-4.102,5.796-5.847l31.043,31.043c1.776-2.22,3.29-4.658,4.497-7.268l-28.425-28.426 c2.683-1.367,5.545-2.44,8.546-3.17l22.646,22.646c0.324-1.926,0.495-3.905,0.495-5.923c0-1.985-0.166-3.93-0.479-5.826 l-12.002-12.002c2.857,0.088,5.641,0.482,8.321,1.148c-5.969-11.183-17.752-18.795-31.315-18.795 c-19.592,0-35.475,15.883-35.475,35.475c0,13.563,7.612,25.346,18.796,31.315C205.11,250.078,204.721,247.429,204.608,244.706z"></path></g><path fill="#FFFFFF" d="M243.651,282.651c-0.88-0.002-1.77-0.034-2.644-0.095l0.587-8.494c1.239,0.086,2.503,0.097,3.757,0.035 c1.263-0.063,2.531-0.203,3.768-0.416l1.442,8.392c-1.572,0.27-3.182,0.448-4.785,0.528 C245.069,282.636,244.354,282.653,243.651,282.651z"></path><path fill="#FFFFFF" d="M231.594,280.743c-3.043-0.982-5.969-2.335-8.695-4.023l4.482-7.24c2.142,1.326,4.439,2.389,6.828,3.159L231.594,280.743z "></path><path fill="#FFFFFF" d="M259.738,279.319l-3.419-7.798c2.297-1.007,4.474-2.295,6.47-3.83l5.189,6.751 C265.437,276.395,262.665,278.036,259.738,279.319z"></path><path fill="#FFFFFF" d="M215.423,270.741c-2.244-2.286-4.208-4.839-5.837-7.587l7.325-4.341c1.28,2.16,2.824,4.166,4.588,5.964L215.423,270.741z"></path><path fill="#FFFFFF" d="M274.813,267.741l-6.647-5.322c1.575-1.967,2.909-4.12,3.965-6.398l7.725,3.58 C278.512,262.501,276.815,265.239,274.813,267.741z"></path><path fill="#FFFFFF" d="M282.803,250.48l-8.36-1.614c0.369-1.911,0.559-3.874,0.564-5.833c0.001-0.555-0.012-1.119-0.04-1.675l-0.004-0.072 l8.504-0.425l0.004,0.073c0.035,0.703,0.052,1.418,0.05,2.122C283.515,245.547,283.273,248.046,282.803,250.48z"></path><path fill="#FFFFFF" d="M273.677,233.877c-0.725-2.404-1.744-4.719-3.028-6.881l7.32-4.349c1.637,2.755,2.935,5.706,3.86,8.771L273.677,233.877z"></path><path fill="#FFFFFF" d="M266.055,221.036c-1.766-1.795-3.746-3.376-5.885-4.697l4.475-7.244c2.72,1.68,5.237,3.689,7.481,5.971L266.055,221.036z"></path></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M0 0v6l5-3-5-3zm5 3v3h2v-6h-2v3z" transform="translate(0 1)" />
</svg>

After

Width:  |  Height:  |  Size: 177 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M0 0v6h2v-6h-2zm4 0v6h2v-6h-2z" transform="translate(1 1)" />
</svg>

After

Width:  |  Height:  |  Size: 175 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M0 0v6l6-3-6-3z" transform="translate(1 1)" />
</svg>

After

Width:  |  Height:  |  Size: 160 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M0 0v6h2v-6h-2zm2 3l5 3v-6l-5 3z" transform="translate(0 1)" />
</svg>

After

Width:  |  Height:  |  Size: 177 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M4 0c-2.2 0-4 1.8-4 4s1.8 4 4 4c1.1 0 2.12-.43 2.84-1.16l-.72-.72c-.54.54-1.29.88-2.13.88-1.66 0-3-1.34-3-3s1.34-3 3-3c.83 0 1.55.36 2.09.91l-1.09 1.09h3v-3l-1.19 1.19c-.72-.72-1.71-1.19-2.81-1.19z" />
</svg>

After

Width:  |  Height:  |  Size: 315 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#d2d2d2">
<path d="M0 0v6h6v-6h-6z" transform="translate(1 1)" />
</svg>

After

Width:  |  Height:  |  Size: 160 B

View File

@@ -981,6 +981,12 @@ QPushButton[themeID="removeIconSmall"],
QPushButton[themeID="configIconSmall"],
QPushButton[themeID="trashIcon"],
QPushButton[themeID="revertIcon"],
QPushButton[themeID="playIcon"],
QPushButton[themeID="pauseIcon"],
QPushButton[themeID="restartIcon"],
QPushButton[themeID="stopIcon"],
QPushButton[themeID="nextIcon"],
QPushButton[themeID="previousIcon"],
QPushButton#transitionRemove,
QPushButton#moveAsyncFilterUp,
QPushButton#moveAsyncFilterDown,
@@ -996,6 +1002,12 @@ QPushButton:hover[themeID="removeIconSmall"],
QPushButton:hover[themeID="configIconSmall"],
QPushButton:hover[themeID="trashIcon"],
QPushButton:hover[themeID="revertIcon"],
QPushButton:hover[themeID="playIcon"],
QPushButton:hover[themeID="pauseIcon"],
QPushButton:hover[themeID="restartIcon"],
QPushButton:hover[themeID="stopIcon"],
QPushButton:hover[themeID="nextIcon"],
QPushButton:hover[themeID="previousIcon"],
QPushButton:hover#transitionRemove,
QPushButton:hover#moveAsyncFilterUp,
QPushButton:hover#moveAsyncFilterDown,
@@ -1409,3 +1421,40 @@ QSlider::handle:horizontal[themeID="tBarSlider"] {
height: 24px;
margin: -24px 0px;
}
/* Source Context */
#contextContainer QPushButton[themeID2=contextBarButton] {
padding: 0px;
background: transparent;
border: none;
}
QPushButton#sourcePropertiesButton {
qproperty-icon: url(./Dark/settings/general.svg);
}
QPushButton#sourceFiltersButton {
qproperty-icon: url(./Dark/filter.svg);
}
/* Media icons */
* [themeID="playIcon"] {
qproperty-icon: url(./Dark/media/media_play.svg);
}
* [themeID="pauseIcon"] {
qproperty-icon: url(./Dark/media/media_pause.svg);
}
* [themeID="restartIcon"] {
qproperty-icon: url(./Dark/media/media_restart.svg);
}
* [themeID="stopIcon"] {
qproperty-icon: url(./Dark/media/media_stop.svg);
}
* [themeID="nextIcon"] {
qproperty-icon: url(./Dark/media/media_next.svg);
}

View File

@@ -265,3 +265,34 @@ QSlider::handle:horizontal[themeID="tBarSlider"] {
height: 24px;
margin: -24px 0px;
}
/* Source Context */
#contextContainer QPushButton[themeID2=contextBarButton] {
padding: 0px;
}
/* Media icons */
* [themeID="playIcon"] {
qproperty-icon: url(:res/images/media/media_play.svg);
}
* [themeID="pauseIcon"] {
qproperty-icon: url(:/res/images/media/media_pause.svg);
}
* [themeID="restartIcon"] {
qproperty-icon: url(:/res/images/media/media_restart.svg);
}
* [themeID="stopIcon"] {
qproperty-icon: url(:/res/images/media/media_stop.svg);
}
* [themeID="nextIcon"] {
qproperty-icon: url(:/res/images/media/media_next.svg);
}
* [themeID="previousIcon"] {
qproperty-icon: url(./Dark/media/media_previous.svg);
}