Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
081fc548
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,发现更多精彩内容 >>
提交
081fc548
编写于
6月 27, 2020
作者:
M
Matt Gajownik
提交者:
jp9000
7月 10, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add setting for taskbar color
上级
a4d8dd5f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
51 addition
and
7 deletion
+51
-7
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+2
-1
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+10
-0
UI/obs-app.cpp
UI/obs-app.cpp
+4
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+13
-4
UI/window-basic-main.hpp
UI/window-basic-main.hpp
+3
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+19
-2
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
081fc548
...
...
@@ -651,9 +651,10 @@ Basic.Settings.General.RecordWhenStreaming="Automatically record when streaming"
Basic.Settings.General.KeepRecordingWhenStreamStops
=
"Keep recording when stream stops"
Basic.Settings.General.ReplayBufferWhileStreaming
=
"Automatically start replay buffer when streaming"
Basic.Settings.General.KeepReplayBufferStreamStops
=
"Keep replay buffer active when stream stops"
Basic.Settings.General.SysTray
=
"System Tray"
Basic.Settings.General.SysTray
=
"System Tray
/Taskbar
"
Basic.Settings.General.SysTrayWhenStarted
=
"Minimize to system tray when started"
Basic.Settings.General.SystemTrayHideMinimize
=
"Always minimize to system tray instead of task bar"
Basic.Settings.General.TaskbarStatusColor
=
"Change taskbar color when output is active"
Basic.Settings.General.SaveProjectors
=
"Save projectors on exit"
Basic.Settings.General.Preview
=
"Preview"
Basic.Settings.General.OverflowHidden
=
"Hide overflow"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
081fc548
...
...
@@ -534,6 +534,16 @@
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"taskbarColor"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"text"
>
<string>
Basic.Settings.General.TaskbarStatusColor
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
...
...
UI/obs-app.cpp
浏览文件 @
081fc548
...
...
@@ -420,6 +420,10 @@ bool OBSApp::InitGlobalConfigDefaults()
"KeepRecordingWhenStreamStops"
,
false
);
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"SysTrayEnabled"
,
true
);
#ifdef _WIN32
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"TaskbarStatusColor"
,
true
);
#endif
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"SysTrayWhenStarted"
,
false
);
config_set_default_bool
(
globalConfig
,
"BasicWindow"
,
"SaveProjectors"
,
...
...
UI/window-basic-main.cpp
浏览文件 @
081fc548
...
...
@@ -5392,7 +5392,8 @@ inline void OBSBasic::OnActivate()
UpdateProcessPriority
();
#ifdef _WIN32
taskProg
->
show
();
if
(
taskbarStatusColor
())
taskProg
->
show
();
taskProg
->
resume
();
taskProg
->
setValue
(
1
);
taskBtn
->
setOverlayIcon
(
QIcon
::
fromTheme
(
...
...
@@ -5426,7 +5427,8 @@ inline void OBSBasic::OnDeactivate()
}
else
{
if
(
os_atomic_load_bool
(
&
recording_paused
))
{
#ifdef _WIN32
taskProg
->
show
();
if
(
taskbarStatusColor
())
taskProg
->
show
();
taskProg
->
pause
();
taskBtn
->
setOverlayIcon
(
QIcon
::
fromTheme
(
"obs-paused"
,
...
...
@@ -5437,7 +5439,8 @@ inline void OBSBasic::OnDeactivate()
QIcon
(
":/res/images/obs_paused.png"
));
}
else
{
#ifdef _WIN32
taskProg
->
show
();
if
(
taskbarStatusColor
())
taskProg
->
show
();
taskProg
->
resume
();
taskBtn
->
setOverlayIcon
(
QIcon
::
fromTheme
(
"obs-active"
,
...
...
@@ -7451,7 +7454,13 @@ bool OBSBasic::sysTrayMinimizeToTray()
return
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SysTrayMinimizeToTray"
);
}
#ifdef _WIN32
bool
OBSBasic
::
taskbarStatusColor
()
{
return
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"TaskbarStatusColor"
);
}
#endif
void
OBSBasic
::
on_actionCopySource_triggered
()
{
copyStrings
.
clear
();
...
...
UI/window-basic-main.hpp
浏览文件 @
081fc548
...
...
@@ -465,6 +465,9 @@ private:
void
ReplayBufferClicked
();
bool
sysTrayMinimizeToTray
();
#ifdef _WIN32
bool
taskbarStatusColor
();
#endif
void
EnumDialogs
();
...
...
UI/window-basic-settings.cpp
浏览文件 @
081fc548
...
...
@@ -398,6 +398,9 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
systemTrayEnabled
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
systemTrayWhenStarted
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
systemTrayAlways
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
#ifdef _WIN32
HookWidget
(
ui
->
taskbarColor
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
#endif
HookWidget
(
ui
->
saveProjectors
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
snappingEnabled
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
screenSnapping
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
...
...
@@ -629,6 +632,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
delete
ui
->
enableNewSocketLoop
;
delete
ui
->
enableLowLatencyMode
;
delete
ui
->
browserHWAccel
;
delete
ui
->
taskbarColor
;
delete
ui
->
sourcesGroup
;
#if defined(__APPLE__) || HAVE_PULSEAUDIO
delete
ui
->
disableAudioDucking
;
...
...
@@ -643,6 +647,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
ui
->
enableNewSocketLoop
=
nullptr
;
ui
->
enableLowLatencyMode
=
nullptr
;
ui
->
browserHWAccel
=
nullptr
;
ui
->
taskbarColor
=
nullptr
;
ui
->
sourcesGroup
=
nullptr
;
#if defined(__APPLE__) || HAVE_PULSEAUDIO
ui
->
disableAudioDucking
=
nullptr
;
...
...
@@ -1198,7 +1203,11 @@ void OBSBasicSettings::LoadGeneralSettings()
bool
systemTrayAlways
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SysTrayMinimizeToTray"
);
ui
->
systemTrayAlways
->
setChecked
(
systemTrayAlways
);
#ifdef _WIN32
bool
taskbarColor
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"TaskbarStatusColor"
);
ui
->
taskbarColor
->
setChecked
(
taskbarColor
);
#endif
bool
saveProjectors
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SaveProjectors"
);
ui
->
saveProjectors
->
setChecked
(
saveProjectors
);
...
...
@@ -2994,7 +3003,15 @@ void OBSBasicSettings::SaveGeneralSettings()
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SysTrayMinimizeToTray"
,
ui
->
systemTrayAlways
->
isChecked
());
#ifdef _WIN32
if
(
WidgetChanged
(
ui
->
taskbarColor
))
{
bool
enable_color
=
ui
->
taskbarColor
->
isChecked
();
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"TaskbarStatusColor"
,
enable_color
);
if
(
!
enable_color
)
main
->
taskProg
->
setVisible
(
enable_color
);
}
#endif
if
(
WidgetChanged
(
ui
->
saveProjectors
))
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SaveProjectors"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录