mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
SettingsDialog: Attempt at fixing tooltip icon on Windows
This commit is contained in:
parent
92214ebbd2
commit
3852a387b5
@ -11,10 +11,12 @@
|
||||
|
||||
#include "../plugin-macros.generated.h"
|
||||
|
||||
QString GetToolTipIcon()
|
||||
QString GetToolTipIconHtml()
|
||||
{
|
||||
bool lightTheme = QApplication::palette().text().color().redF() < 0.5;
|
||||
return lightTheme ? ":toolTip/images/help.svg" : ":toolTip/images/help_light.svg";
|
||||
QString iconFile = lightTheme ? ":toolTip/images/help.svg" : ":toolTip/images/help_light.svg";
|
||||
QString iconTemplate = "<html> <img src='%1' style=' vertical-align: bottom; ' /></html>";
|
||||
return iconTemplate.arg(iconFile);
|
||||
}
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget* parent) :
|
||||
@ -27,7 +29,7 @@ SettingsDialog::SettingsDialog(QWidget* parent) :
|
||||
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
|
||||
ui->enableDebugLoggingToolTipLabel->setText(GetToolTipIconHtml()); // Set the appropriate tooltip icon for the theme
|
||||
|
||||
connect(sessionTableTimer, &QTimer::timeout,
|
||||
this, &SettingsDialog::FillSessionTable);
|
||||
|
@ -97,9 +97,6 @@
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user