mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-08 17:45:57 -05:00
Allow choosing highlight color
This commit is contained in:
@@ -49,8 +49,8 @@ public:
|
||||
std::shared_ptr<Macro> getSelectedMacro();
|
||||
void SetEditMacro(Macro &m);
|
||||
void SetMacroEditAreaDisabled(bool);
|
||||
void HighlightAction(int idx);
|
||||
void HighlightCondition(int idx);
|
||||
void HighlightAction(int idx, QColor color = QColor(Qt::green));
|
||||
void HighlightCondition(int idx, QColor color = QColor(Qt::green));
|
||||
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
||||
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
||||
void SetActionData(Macro &m);
|
||||
|
||||
@@ -97,7 +97,7 @@ void MacroSegmentList::Clear(int idx)
|
||||
clearLayout(_contentLayout, idx);
|
||||
}
|
||||
|
||||
void MacroSegmentList::Highlight(int idx)
|
||||
void MacroSegmentList::Highlight(int idx, QColor color)
|
||||
{
|
||||
auto item = _contentLayout->itemAt(idx);
|
||||
if (!item) {
|
||||
@@ -107,7 +107,7 @@ void MacroSegmentList::Highlight(int idx)
|
||||
if (!widget) {
|
||||
return;
|
||||
}
|
||||
PulseWidget(widget, QColor(Qt::green), QColor(0, 0, 0, 0), true);
|
||||
PulseWidget(widget, color, QColor(0, 0, 0, 0), true);
|
||||
}
|
||||
|
||||
void MacroSegmentList::SetCollapsed(bool collapse)
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
void Add(QWidget *widget);
|
||||
void Remove(int idx);
|
||||
void Clear(int idx = 0); // Clear all elements >= idx
|
||||
void Highlight(int idx);
|
||||
void Highlight(int idx, QColor color = QColor(Qt::green));
|
||||
void SetCollapsed(bool);
|
||||
void SetSelection(int idx);
|
||||
QVBoxLayout *ContentLayout() { return _contentLayout; }
|
||||
|
||||
@@ -299,14 +299,14 @@ void AdvSceneSwitcher::SetMacroEditAreaDisabled(bool disable)
|
||||
ui->macroActionConditionSplitter->setDisabled(disable);
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::HighlightAction(int idx)
|
||||
void AdvSceneSwitcher::HighlightAction(int idx, QColor color)
|
||||
{
|
||||
actionsList->Highlight(idx);
|
||||
actionsList->Highlight(idx, color);
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::HighlightCondition(int idx)
|
||||
void AdvSceneSwitcher::HighlightCondition(int idx, QColor color)
|
||||
{
|
||||
conditionsList->Highlight(idx);
|
||||
conditionsList->Highlight(idx, color);
|
||||
}
|
||||
|
||||
std::shared_ptr<Macro> AdvSceneSwitcher::getSelectedMacro()
|
||||
|
||||
Reference in New Issue
Block a user