Skip to content

Commit 0c8caa9

Browse files
committed
frontend: Replace add source dropdown with dialog
1 parent f8d2bfe commit 0c8caa9

File tree

7 files changed

+1238
-398
lines changed

7 files changed

+1238
-398
lines changed

frontend/data/locale/en-US.ini

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,15 +616,20 @@ RenameProfile.Title="Rename Profile"
616616
Basic.Main.MixerRename.Title="Rename Audio Source"
617617
Basic.Main.MixerRename.Text="Please enter the name of the audio source"
618618

619-
620619
# preview window disabled
621620
Basic.Main.PreviewDisabled="Preview is currently disabled"
622621

623622
# add source dialog
624-
Basic.SourceSelect="Create/Select Source"
625-
Basic.SourceSelect.CreateNew="Create new"
626-
Basic.SourceSelect.AddExisting="Add Existing"
623+
Basic.SourceSelect="Add Source"
624+
Basic.SourceSelect.SelectType="Source Type"
625+
Basic.SourceSelect.Recent="Recently Added"
626+
Basic.SourceSelect.NewSource="New Source"
627+
Basic.SourceSelect.Existing="Existing Sources"
628+
Basic.SourceSelect.CreateButton="Create"
627629
Basic.SourceSelect.AddVisible="Make source visible"
630+
Basic.SourceSelect.NoExisting="No existing %1 sources"
631+
Basic.SourceSelect.Accessible.SourceName="Source Name"
632+
Basic.SourceSelect.Accessible.Existing="Add an Existing Source"
628633

629634
# source box
630635
Basic.Main.Sources.Visibility="Visibility"
@@ -760,6 +765,7 @@ Basic.Main.ShowContextBar="Show Source Toolbar"
760765
Basic.Main.HideContextBar="Hide Source Toolbar"
761766
Basic.Main.StopVirtualCam="Stop Virtual Camera"
762767
Basic.Main.Group="Group %1"
768+
Basic.Main.NewGroup="New Group"
763769
Basic.Main.GroupItems="Group Selected Items"
764770
Basic.Main.Ungroup="Ungroup"
765771
Basic.Main.GridMode="Grid Mode"

frontend/data/themes/Yami.obt

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@
251251
background-color: var(--bg_base);
252252
}
253253

254+
.text-title {
255+
font-size: var(--font_large);
256+
font-weight: bold;
257+
}
258+
254259
.text-heading {
255260
font-size: var(--font_heading);
256261
font-weight: bold;
@@ -290,6 +295,48 @@
290295
padding: var(--padding_large) 0px;
291296
}
292297

298+
.dialog-container {
299+
padding: var(--padding_large) var(--padding_xlarge);
300+
}
301+
302+
.dialog-frame {
303+
background-color: var(--grey6);
304+
border-radius: var(--border_radius);
305+
border: 1px solid var(--border_color);
306+
margin: var(--spacing_base);
307+
}
308+
309+
.dialog-frame > QWidget {
310+
margin: var(--spacing_base) 0;
311+
}
312+
313+
314+
.add-item-button {
315+
background-color: var(--grey5);
316+
border-width: 1px;
317+
border-color: var(--grey3);
318+
padding: var(--padding_xlarge) var(--padding_wide);
319+
border-radius: var(--border_radius_small);
320+
outline: none;
321+
}
322+
323+
.add-item-button:focus {
324+
border-color: var(--white1);
325+
}
326+
327+
.add-item-button:hover {
328+
border-color: var(--primary_lighter);
329+
}
330+
331+
.add-item-button:hover,
332+
.add-item-button:focus {
333+
background: var(--primary);
334+
background-image: url(theme:Dark/plus.svg);
335+
background-repeat: no-repeat;
336+
background-position: center right;
337+
background-origin: content;
338+
}
339+
293340
/* Icon Overrides */
294341

295342
.icon-plus {
@@ -449,7 +496,6 @@ QListWidget QWidget {
449496
border: 1px solid var(--bg_base);
450497
}
451498

452-
453499
/* Misc */
454500

455501
QAbstractItemView {
@@ -588,6 +634,7 @@ QListWidget QLineEdit:focus {
588634
/* Settings QList */
589635

590636
OBSBasicSettings QScrollBar:vertical {
637+
background-color: var(--grey6);
591638
width: var(--settings_scrollbar_size);
592639
margin-left: 9px;
593640
}
@@ -2023,3 +2070,41 @@ OBSBasicAdvAudio #scrollAreaWidgetContents {
20232070
#previewZoomOutButton:focus {
20242071
border: 1px solid var(--input_border_hover);
20252072
}
2073+
2074+
/* Add Source Dialog */
2075+
2076+
#selectTypeFrame QPushButton,
2077+
#selectSourceContainer QPushButton {
2078+
text-align: left;
2079+
}
2080+
2081+
#selectTypeFrame QPushButton {
2082+
background: var(--grey5);
2083+
border: 1px solid transparent;
2084+
padding: var(--padding_xlarge) var(--padding_wide);
2085+
margin: var(--spacing_large);
2086+
outline: none;
2087+
}
2088+
2089+
#selectTypeFrame QPushButton:hover {
2090+
background-color: var(--grey3);
2091+
border-color: var(--grey1);
2092+
border-style: solid;
2093+
}
2094+
2095+
#selectTypeFrame QPushButton:checked {
2096+
background-color: var(--purple4);
2097+
border-color: var(--purple2);
2098+
border-style: solid;
2099+
}
2100+
2101+
#selectTypeFrame QPushButton:focus {
2102+
border-color: var(--white1);
2103+
border-style: solid;
2104+
}
2105+
2106+
#selectTypeFrame QPushButton:pressed {
2107+
background-color: var(--grey6);
2108+
border-color: var(--grey3);
2109+
border-style: solid;
2110+
}

0 commit comments

Comments
 (0)