mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-14 04:26:08 -05:00
Add HelpIcon
A QLabel consisting of a question mark icon and tooltip
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "source-setting.hpp"
|
||||
#include "obs-module-helper.hpp"
|
||||
#include "math-helpers.hpp"
|
||||
#include "ui-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -233,14 +232,8 @@ SourceSettingSelection::SourceSettingSelection(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
_settings(new FilterComboBox(
|
||||
this, obs_module_text("AdvSceneSwitcher.setting.select"))),
|
||||
_tooltip(new QLabel())
|
||||
_tooltip(new HelpIcon())
|
||||
{
|
||||
QString path = GetThemeTypeName() == "Light"
|
||||
? ":/res/images/help.svg"
|
||||
: ":/res/images/help_light.svg";
|
||||
QIcon icon(path);
|
||||
QPixmap pixmap = icon.pixmap(QSize(16, 16));
|
||||
_tooltip->setPixmap(pixmap);
|
||||
_tooltip->hide();
|
||||
|
||||
_settings->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "filter-combo-box.hpp"
|
||||
#include "help-icon.hpp"
|
||||
|
||||
#include <obs.hpp>
|
||||
#include <optional>
|
||||
@@ -52,7 +53,7 @@ private:
|
||||
void Populate(const OBSWeakSource &);
|
||||
|
||||
FilterComboBox *_settings;
|
||||
QLabel *_tooltip;
|
||||
HelpIcon *_tooltip;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
||||
Reference in New Issue
Block a user