ソースを参照

UI: Replace bad YouTube link with popup helper

The helper link associated with starting a scheduled broadcast was not
helpful, as it linked to developer API documentation. Instead, have the
helper widget pop up a tooltip so the user understands what it is doing,
and adjust the wording slightly so that the user knows it's a setting
primarily used for scheduled broadcasts (normal streams always start
right away)
jp9000 4 年 前
コミット
bbad7f3e1f

+ 1 - 1
UI/data/locale/en-US.ini

@@ -1208,7 +1208,7 @@ YouTube.Actions.Latency.Low="Low"
 YouTube.Actions.Latency.UltraLow="Ultra low"
 YouTube.Actions.Latency.UltraLow="Ultra low"
 YouTube.Actions.EnableAutoStart="Enable Auto-start"
 YouTube.Actions.EnableAutoStart="Enable Auto-start"
 YouTube.Actions.EnableAutoStop="Enable Auto-stop"
 YouTube.Actions.EnableAutoStop="Enable Auto-stop"
-YouTube.Actions.AutoStartStop.Help="<a href='https://developers.google.com/youtube/v3/live/docs/liveBroadcasts#contentDetails.enableAutoStart'>(?)</a>"
+YouTube.Actions.AutoStartStop.TT="Indicates whether this scheduled broadcast should start automatically"
 YouTube.Actions.EnableDVR="Enable DVR"
 YouTube.Actions.EnableDVR="Enable DVR"
 YouTube.Actions.360Video="360 video"
 YouTube.Actions.360Video="360 video"
 YouTube.Actions.360Video.Help="<a href='https://vr.youtube.com/create/360/'>(?)</a>"
 YouTube.Actions.360Video.Help="<a href='https://vr.youtube.com/create/360/'>(?)</a>"

+ 2 - 2
UI/forms/OBSYoutubeActions.ui

@@ -262,7 +262,7 @@
             </sizepolicy>
             </sizepolicy>
            </property>
            </property>
            <property name="text">
            <property name="text">
-            <string>YouTube.Actions.AutoStartStop.Help</string>
+            <string notr="true">&lt;a href=&quot;.&quot;&gt;(?)&lt;/a&gt;</string>
            </property>
            </property>
            <property name="textFormat">
            <property name="textFormat">
             <enum>Qt::RichText</enum>
             <enum>Qt::RichText</enum>
@@ -474,7 +474,7 @@
            <rect>
            <rect>
             <x>0</x>
             <x>0</x>
             <y>0</y>
             <y>0</y>
-            <width>179</width>
+            <width>522</width>
             <height>192</height>
             <height>192</height>
            </rect>
            </rect>
           </property>
           </property>

+ 6 - 1
UI/window-youtube-actions.cpp

@@ -5,6 +5,7 @@
 #include "qt-wrappers.hpp"
 #include "qt-wrappers.hpp"
 #include "youtube-api-wrappers.hpp"
 #include "youtube-api-wrappers.hpp"
 
 
+#include <QToolTip>
 #include <QDateTime>
 #include <QDateTime>
 #include <QDesktopServices>
 #include <QDesktopServices>
 
 
@@ -56,7 +57,11 @@ OBSYoutubeActions::OBSYoutubeActions(QWidget *parent, Auth *auth)
 		&OBSYoutubeActions::OpenYouTubeDashboard);
 		&OBSYoutubeActions::OpenYouTubeDashboard);
 
 
 	connect(ui->helpAutoStartStop, &QLabel::linkActivated, this,
 	connect(ui->helpAutoStartStop, &QLabel::linkActivated, this,
-		[](const QString &link) { QDesktopServices::openUrl(link); });
+		[](const QString &) {
+			QToolTip::showText(
+				QCursor::pos(),
+				QTStr("YouTube.Actions.AutoStartStop.TT"));
+		});
 	connect(ui->help360Video, &QLabel::linkActivated, this,
 	connect(ui->help360Video, &QLabel::linkActivated, this,
 		[](const QString &link) { QDesktopServices::openUrl(link); });
 		[](const QString &link) { QDesktopServices::openUrl(link); });
 	connect(ui->helpMadeForKids, &QLabel::linkActivated, this,
 	connect(ui->helpMadeForKids, &QLabel::linkActivated, this,