Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
5a5efa0b
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5a5efa0b
编写于
2月 28, 2019
作者:
C
Clayton Groenveld
提交者:
Clayton Groeneveld
3月 03, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add preview/program labels in studio mode
上级
748067c9
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
126 addition
and
14 deletion
+126
-14
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+1
-0
UI/data/themes/Acri.qss
UI/data/themes/Acri.qss
+8
-0
UI/data/themes/Dark.qss
UI/data/themes/Dark.qss
+8
-0
UI/data/themes/Default.qss
UI/data/themes/Default.qss
+8
-0
UI/data/themes/Rachni.qss
UI/data/themes/Rachni.qss
+8
-0
UI/forms/OBSBasic.ui
UI/forms/OBSBasic.ui
+10
-3
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+19
-9
UI/obs-app.cpp
UI/obs-app.cpp
+2
-0
UI/window-basic-main-transitions.cpp
UI/window-basic-main-transitions.cpp
+25
-2
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+20
-0
UI/window-basic-main.hpp
UI/window-basic-main.hpp
+4
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+13
-0
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
5a5efa0b
...
...
@@ -604,6 +604,7 @@ Basic.Settings.General.OverflowAlwaysVisible="Overflow always visible"
Basic.Settings.General.OverflowSelectionHidden
=
"Show overflow even when source is invisible"
Basic.Settings.General.SwitchOnDoubleClick
=
"Transition to scene when double-clicked"
Basic.Settings.General.StudioPortraitLayout
=
"Enable portrait/vertical layout"
Basic.Settings.General.TogglePreviewProgramLabels
=
"Show preview/program labels"
Basic.Settings.General.Multiview
=
"Multiview"
Basic.Settings.General.Multiview.MouseSwitch
=
"Click to switch between scenes"
Basic.Settings.General.Multiview.DrawSourceNames
=
"Show scene names"
...
...
UI/data/themes/Acri.qss
浏览文件 @
5a5efa0b
...
...
@@ -907,3 +907,11 @@ FocusList::item {
* [themeID="displayBackgroundColor"] {
qproperty-displayBackgroundColor: #28282A;
}
/* Preview/Program labels */
* [themeID="previewProgramLabels"] {
font-size: 18px;
font-weight: bold;
color: rgb(122,121,122);
}
UI/data/themes/Dark.qss
浏览文件 @
5a5efa0b
...
...
@@ -698,3 +698,11 @@ QLabel#errorLabel {
* [themeID="displayBackgroundColor"] {
qproperty-displayBackgroundColor: rgb(76, 76, 76);
}
/* Preview/Program labels */
* [themeID="previewProgramLabels"] {
font-size: 18px;
font-weight: bold;
color: rgb(122,121,122);
}
UI/data/themes/Default.qss
浏览文件 @
5a5efa0b
...
...
@@ -141,3 +141,11 @@ QLabel#errorLabel {
* [themeID="displayBackgroundColor"] {
qproperty-displayBackgroundColor: rgb(76, 76, 76);
}
/* Preview/Program labels */
* [themeID="previewProgramLabels"] {
font-size: 18px;
font-weight: bold;
color: rgb(122,121,122);
}
UI/data/themes/Rachni.qss
浏览文件 @
5a5efa0b
...
...
@@ -1263,3 +1263,11 @@ QToolTip {
* [themeID="displayBackgroundColor"] {
qproperty-displayBackgroundColor: rgb(35, 38, 41);
}
/* Preview/Program labels */
* [themeID="previewProgramLabels"] {
font-size: 18px;
font-weight: bold;
color: rgb(122,121,122);
}
UI/forms/OBSBasic.ui
浏览文件 @
5a5efa0b
...
...
@@ -69,6 +69,13 @@
<property
name=
"spacing"
>
<number>
4
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"previewLabel"
>
<property
name=
"text"
>
<string>
StudioMode.Preview
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"OBSBasicPreview"
name=
"preview"
native=
"true"
>
<property
name=
"sizePolicy"
>
...
...
@@ -106,7 +113,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
1079
</width>
<height>
2
1
</height>
<height>
2
5
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menu_File"
>
...
...
@@ -644,7 +651,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
230
</width>
<width>
82
</width>
<height>
16
</height>
</rect>
</property>
...
...
@@ -698,7 +705,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
16
</width>
<height>
2
30
</height>
<height>
2
6
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
5a5efa0b
...
...
@@ -144,9 +144,9 @@
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
80
1
</width>
<height>
931
</height>
<y>
-54
0
</y>
<width>
80
4
</width>
<height>
1264
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_19"
>
...
...
@@ -634,6 +634,16 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"prevProgLabelToggle"
>
<property
name=
"text"
>
<string>
Basic.Settings.General.TogglePreviewProgramLabels
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -1144,8 +1154,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
601
</width>
<height>
640
</height>
<width>
890
</width>
<height>
791
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_21"
>
...
...
@@ -3845,8 +3855,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
63
</width>
<height>
16
</height>
<width>
98
</width>
<height>
28
</height>
</rect>
</property>
</widget>
...
...
@@ -4259,8 +4269,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
594
</width>
<height>
833
</height>
<width>
867
</width>
<height>
1061
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_23"
>
...
...
UI/obs-app.cpp
浏览文件 @
5a5efa0b
...
...
@@ -418,6 +418,8 @@ bool OBSApp::InitGlobalConfigDefaults()
"ShowListboxToolbars"
,
true
);
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"ShowStatusBar"
,
true
);
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"StudioModeLabels"
,
true
);
if
(
!
config_get_bool
(
globalConfig
,
"General"
,
"Pre21Defaults"
))
{
config_set_default_string
(
globalConfig
,
"General"
,
...
...
UI/window-basic-main-transitions.cpp
浏览文件 @
5a5efa0b
...
...
@@ -696,6 +696,7 @@ void OBSBasic::SetCurrentScene(OBSSource scene, bool force, bool direct)
void
OBSBasic
::
CreateProgramDisplay
()
{
program
=
new
OBSQTDisplay
();
program
->
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
connect
(
program
.
data
(),
&
QWidget
::
customContextMenuRequested
,
this
,
&
OBSBasic
::
on_program_customContextMenuRequested
);
...
...
@@ -1192,6 +1193,8 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
if
(
IsPreviewProgramMode
()
==
enabled
)
return
;
ui
->
previewLabel
->
setHidden
(
!
enabled
);
ui
->
modeSwitch
->
setChecked
(
enabled
);
os_atomic_set_bool
(
&
previewProgramMode
,
enabled
);
...
...
@@ -1230,10 +1233,28 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
RefreshQuickTransitions
();
programLabel
=
new
QLabel
(
QTStr
(
"StudioMode.Program"
));
programLabel
->
setAlignment
(
Qt
::
AlignHCenter
|
Qt
::
AlignVCenter
);
programLabel
->
setProperty
(
"themeID"
,
"previewProgramLabels"
);
programWidget
=
new
QWidget
();
programLayout
=
new
QVBoxLayout
();
programLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
programLayout
->
addWidget
(
programLabel
);
programLayout
->
addWidget
(
program
);
bool
labels
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioModeLabels"
);
programLabel
->
setHidden
(
!
labels
);
programWidget
->
setLayout
(
programLayout
);
ui
->
previewLayout
->
addWidget
(
programOptions
);
ui
->
previewLayout
->
addWidget
(
program
);
ui
->
previewLayout
->
addWidget
(
program
Widget
);
ui
->
previewLayout
->
setAlignment
(
programOptions
,
Qt
::
AlignCenter
);
program
->
show
();
if
(
api
)
api
->
on_event
(
OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED
);
...
...
@@ -1251,6 +1272,8 @@ void OBSBasic::SetPreviewProgramMode(bool enabled)
delete
programOptions
;
delete
program
;
delete
programLabel
;
delete
programWidget
;
if
(
lastScene
)
{
OBSSource
actualLastScene
=
OBSGetStrongRef
(
lastScene
);
...
...
UI/window-basic-main.cpp
浏览文件 @
5a5efa0b
...
...
@@ -371,6 +371,17 @@ OBSBasic::OBSBasic(QWidget *parent)
QPoint
statsDockPos
=
curSize
/
2
-
statsDockSize
/
2
;
QPoint
newPos
=
curPos
+
statsDockPos
;
statsDock
->
move
(
newPos
);
ui
->
previewLabel
->
setAlignment
(
Qt
::
AlignHCenter
|
Qt
::
AlignVCenter
);
ui
->
previewLabel
->
setProperty
(
"themeID"
,
"previewProgramLabels"
);
bool
labels
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioModeLabels"
);
if
(
!
previewProgramMode
)
ui
->
previewLabel
->
setHidden
(
true
);
else
ui
->
previewLabel
->
setHidden
(
!
labels
);
}
static
void
SaveAudioDevice
(
const
char
*
name
,
int
channel
,
obs_data_t
*
parent
,
...
...
@@ -3437,10 +3448,19 @@ void OBSBasic::ResetUI()
bool
studioPortraitLayout
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioPortraitLayout"
);
bool
labels
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioModeLabels"
);
if
(
studioPortraitLayout
)
ui
->
previewLayout
->
setDirection
(
QBoxLayout
::
TopToBottom
);
else
ui
->
previewLayout
->
setDirection
(
QBoxLayout
::
LeftToRight
);
if
(
previewProgramMode
)
ui
->
previewLabel
->
setHidden
(
!
labels
);
if
(
programLabel
)
programLabel
->
setHidden
(
!
labels
);
}
int
OBSBasic
::
ResetVideo
()
...
...
UI/window-basic-main.hpp
浏览文件 @
5a5efa0b
...
...
@@ -229,6 +229,10 @@ private:
QPointer
<
QMenu
>
perSceneTransitionMenu
;
QPointer
<
QObject
>
shortcutFilter
;
QPointer
<
QWidget
>
programWidget
;
QPointer
<
QVBoxLayout
>
programLayout
;
QPointer
<
QLabel
>
programLabel
;
void
UpdateMultiviewProjectorMenu
();
void
DrawBackdrop
(
float
cx
,
float
cy
);
...
...
UI/window-basic-settings.cpp
浏览文件 @
5a5efa0b
...
...
@@ -325,6 +325,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
overflowSelectionHide
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
doubleClickSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
studioPortraitLayout
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
prevProgLabelToggle
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewMouseSwitch
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewDrawNames
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
multiviewDrawAreas
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
...
...
@@ -1120,6 +1121,10 @@ void OBSBasicSettings::LoadGeneralSettings()
"BasicWindow"
,
"StudioPortraitLayout"
);
ui
->
studioPortraitLayout
->
setChecked
(
studioPortraitLayout
);
bool
prevProgLabels
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioModeLabels"
);
ui
->
prevProgLabelToggle
->
setChecked
(
prevProgLabels
);
bool
multiviewMouseSwitch
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"MultiviewMouseSwitch"
);
ui
->
multiviewMouseSwitch
->
setChecked
(
multiviewMouseSwitch
);
...
...
@@ -2767,6 +2772,14 @@ void OBSBasicSettings::SaveGeneralSettings()
main
->
ResetUI
();
}
if
(
WidgetChanged
(
ui
->
prevProgLabelToggle
))
{
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"StudioModeLabels"
,
ui
->
prevProgLabelToggle
->
isChecked
());
main
->
ResetUI
();
}
bool
multiviewChanged
=
false
;
if
(
WidgetChanged
(
ui
->
multiviewMouseSwitch
))
{
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录