UI: Add Grid Mode to Scenes Widget

Adds an option to the right click menu in the scenes widget to switch
modes. When in regular list mode, it'll let you select grid mode, and in
grid mode, it'll let you select list mode. Grid mode changes the scenes
widget to have a grid of buttons for scenes rather than a list, much
like XSplit.
This commit is contained in:
VodBox
2019-08-27 20:08:43 +12:00
parent d35a9abd1d
commit c0e2e7f12e
11 changed files with 345 additions and 2 deletions

View File

@@ -1022,3 +1022,25 @@ OBSBasic {
qproperty-sceneIcon: url(./Dark/sources/scene.svg);
qproperty-defaultIcon: url(./Dark/sources/default.svg);
}
/* Scene Tree */
SceneTree#scenes {
qproperty-gridItemWidth: 180;
qproperty-gridItemHeight: 35;
}
*[gridMode="true"] SceneTree#scenes {
border-bottom: none;
}
*[gridMode="false"] SceneTree#scenes {
border-bottom: 2px solid #2f2f2f;
}
*[gridMode="true"] SceneTree::item {
padding: 4px;
padding-left: 10px;
padding-right: 10px;
margin: 0px;
}

View File

@@ -12,6 +12,7 @@
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/******************************************************************************/
@@ -774,3 +775,37 @@ OBSBasic {
qproperty-sceneIcon: url(./Dark/sources/scene.svg);
qproperty-defaultIcon: url(./Dark/sources/default.svg);
}
/* Scene Tree */
SceneTree {
qproperty-gridItemWidth: 150;
qproperty-gridItemHeight: 27;
}
*[gridMode="true"] SceneTree::item {
color: rgb(225,224,225); /* veryLight */
background-color: rgb(76,76,76);
border: none;
border-radius: 3px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
margin: 1px;
}
*[gridMode="true"] SceneTree::item:selected {
background-color: rgb(122,121,122); /* light */
}
*[gridMode="true"] SceneTree::item:hover {
background-color: rgb(122,121,122); /* light */
}
*[gridMode="true"] SceneTree::item:pressed {
background-color: rgb(31,30,31); /* veryDark */
}
*[gridMode="true"] SceneTree::item:checked {
background-color: rgb(122,121,122); /* light */
}

View File

@@ -1365,3 +1365,10 @@ OBSBasic {
qproperty-sceneIcon: url(./Dark/sources/scene.svg);
qproperty-defaultIcon: url(./Dark/sources/default.svg);
}
/* Scene Tree */
SceneTree#scenes {
qproperty-gridItemWidth: 150;
qproperty-gridItemHeight: 30;
}

View File

@@ -233,3 +233,10 @@ QListWidget::item,
SourceTree::item {
height: 24px;
}
/* Scene Tree */
SceneTree {
qproperty-gridItemWidth: 150;
qproperty-gridItemHeight: 24;
}