mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
SettingsDialog: Add tooltip icon to debug checkbox
This commit is contained in:
parent
3d0ba91ff2
commit
a7c4f98ffa
@ -29,6 +29,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(CMAKE_AUTORCC ON) # For resources.qrc
|
||||
|
||||
# Tell websocketpp not to use system boost
|
||||
add_definitions(-DASIO_STANDALONE)
|
||||
@ -90,6 +91,7 @@ set(obs-websocket_SOURCES
|
||||
src/requesthandler/rpc/RequestResult.cpp
|
||||
src/forms/SettingsDialog.cpp
|
||||
src/forms/ConnectInfo.cpp
|
||||
src/forms/resources.qrc
|
||||
src/utils/Json.cpp
|
||||
src/utils/Crypto.cpp
|
||||
src/utils/Platform.cpp
|
||||
|
@ -11,6 +11,12 @@
|
||||
|
||||
#include "../plugin-macros.generated.h"
|
||||
|
||||
QString GetToolTipIcon()
|
||||
{
|
||||
bool lightTheme = QApplication::palette().text().color().redF() < 0.5;
|
||||
return lightTheme ? ":toolTip/images/help.svg" : ":toolTip/images/help_light.svg";
|
||||
}
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget* parent) :
|
||||
QDialog(parent, Qt::Dialog),
|
||||
ui(new Ui::SettingsDialog),
|
||||
@ -18,9 +24,11 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
|
||||
sessionTableTimer(new QTimer)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->websocketSessionTable->horizontalHeader()->resizeSection(3, 100);
|
||||
ui->websocketSessionTable->horizontalHeader()->resizeSection(3, 100); // Resize Session Table column widths
|
||||
ui->websocketSessionTable->horizontalHeader()->resizeSection(4, 100);
|
||||
|
||||
ui->enableDebugLoggingToolTipLabel->setPixmap(QPixmap(GetToolTipIcon())); // Set the appropriate tooltip icon for the theme
|
||||
|
||||
connect(sessionTableTimer, &QTimer::timeout,
|
||||
this, &SettingsDialog::FillSessionTable);
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked,
|
||||
|
@ -78,6 +78,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableDebugLoggingCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>OBSWebSocket.Settings.DebugEnableHoverText</string>
|
||||
@ -87,6 +92,31 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="enableDebugLoggingToolTipLabel">
|
||||
<property name="toolTip">
|
||||
<string>OBSWebSocket.Settings.DebugEnableHoverText</string>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="resources.qrc">:/toolTip/images/help.svg</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -263,7 +293,9 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
1
src/forms/images/help.svg
Normal file
1
src/forms/images/help.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
|
After Width: | Height: | Size: 367 B |
1
src/forms/images/help_light.svg
Normal file
1
src/forms/images/help_light.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="rgb(82.352941%,82.352941%,82.352941%)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
|
After Width: | Height: | Size: 392 B |
6
src/forms/resources.qrc
Normal file
6
src/forms/resources.qrc
Normal file
@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="toolTip">
|
||||
<file>images/help_light.svg</file>
|
||||
<file>images/help.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user