UI: flatten preferences behavior tabs and add node parameter editor shortcut

- Move Behavior-General options (hover focus, slider ladder, scroll zooms)
  into the General preferences tab.
- Move Behavior-Audio option (audio scrubbing) into the Audio preferences tab.
- Promote remaining Behavior categories (Timeline, Playback, Project, Nodes,
  Rendering) to top-level sidebar entries without the 'Behavior - ' prefix.
- Update Chinese translations for the new sidebar titles and fill unfinished
  Behavior tab strings.

NodeView:
- Remove double-click jump-to-parameter-editor behavior; keep expand/collapse.
- Add right-click context menu item 'Show in Parameter Editor'.
- Add Shift+P shortcut bound to the same action.

Render:
- Fix crash in PreviewAutoCacher::ClearSingleFrameRenders when proxy playback
  causes a render ticket to finish synchronously before the watcher pointer is
  returned. Defer the watcher Finished signal via queued connection so the
  caller can safely register the watcher before it is deleted.
This commit is contained in:
2026-07-13 10:19:30 +08:00
parent f57ffa482f
commit 5c8f80480d
12 changed files with 168 additions and 85 deletions
+11 -15
View File
@@ -45,22 +45,18 @@ PreferencesDialog::PreferencesDialog(MainWindow *main_window, int start_tab)
AddTab(new PreferencesGeneralTab(), tr("General"));
AddTab(new PreferencesAppearanceTab(), tr("Appearance"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryGeneral),
tr("Behavior - General"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryAudio),
tr("Behavior - Audio"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryTimeline),
tr("Behavior - Timeline"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryPlayback),
tr("Behavior - Playback"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryProject),
tr("Behavior - Project"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryNodes),
tr("Behavior - Nodes"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryRendering),
tr("Behavior - Rendering"));
AddTab(new PreferencesDiskTab(), tr("Disk"));
AddTab(new PreferencesAudioTab(), tr("Audio"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryTimeline),
tr("Timeline"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryPlayback),
tr("Playback"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryProject),
tr("Project"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryNodes),
tr("Nodes"));
AddTab(new PreferencesBehaviorTab(PreferencesBehaviorTab::kCategoryRendering),
tr("Rendering"));
AddTab(new PreferencesDiskTab(), tr("Disk"));
AddTab(new PreferencesKeyboardTab(main_window), tr("Keyboard"));
SetCurrentTab(start_tab);
@@ -54,6 +54,11 @@ PreferencesAudioTab::PreferencesAudioTab()
audio_tab_layout->addLayout(main_layout);
}
audio_scrubbing_ = new QCheckBox(
PreferencesBehaviorTab::BehaviorPrefTr("Enable audio scrubbing"));
audio_scrubbing_->setChecked(OLIVE_CONFIG("AudioScrubbing").toBool());
audio_tab_layout->addWidget(audio_scrubbing_);
{
QGroupBox *groupbox = new QGroupBox();
audio_tab_layout->addWidget(groupbox);
@@ -232,6 +237,8 @@ void PreferencesAudioTab::Accept(MultiUndoCommand *command)
.to_string());
emit AudioManager::instance() -> OutputParamsChanged();
OLIVE_CONFIG("AudioScrubbing") = audio_scrubbing_->isChecked();
}
void PreferencesAudioTab::RefreshBackends()
@@ -24,10 +24,12 @@
#include <QComboBox>
#include <QPushButton>
#include <QCheckBox>
#include "dialog/configbase/configdialogbase.h"
#include "dialog/export/exportaudiotab.h"
#include "dialog/export/exportformatcombobox.h"
#include "preferencesbehaviortab.h"
namespace olive
{
@@ -70,6 +72,8 @@ private:
ExportAudioTab *record_options_;
QCheckBox *audio_scrubbing_;
private slots:
void RefreshBackends();
@@ -36,23 +36,6 @@ PreferencesBehaviorTab::PreferencesBehaviorTab(Category category)
layout->setAlignment(Qt::AlignTop);
switch (category_) {
case kCategoryGeneral:
AddItem(tr("Enable hover focus"), QStringLiteral("HoverFocus"),
tr("Panels will be considered focused when the mouse cursor is "
"over them without having to click them."));
AddItem(tr("Enable slider ladder"), QStringLiteral("UseSliderLadders"));
AddItem(
tr("Scrolling zooms by default"), QStringLiteral("ScrollZooms"),
tr("By default, scrolling will move the view around, and holding "
"Ctrl/Cmd will make it zoom instead. Enabling this will switch "
"those, scrolling will zoom by default, and holding Ctrl/Cmd will "
"move the view instead."));
break;
case kCategoryAudio:
AddItem(tr("Enable audio scrubbing"), QStringLiteral("AudioScrubbing"));
break;
case kCategoryTimeline:
AddItems({
{ tr("Auto-Seek to Imported Clips"),
@@ -24,6 +24,7 @@
#include <QCheckBox>
#include <QComboBox>
#include <QCoreApplication>
#include <QVBoxLayout>
#include "dialog/configbase/configdialogbase.h"
@@ -35,8 +36,6 @@ class PreferencesBehaviorTab : public ConfigDialogBaseTab {
Q_OBJECT
public:
enum Category {
kCategoryGeneral,
kCategoryAudio,
kCategoryTimeline,
kCategoryPlayback,
kCategoryProject,
@@ -48,11 +47,16 @@ public:
virtual void Accept(MultiUndoCommand *command) override;
static QString BehaviorPrefTr(const char *text)
{
return QCoreApplication::translate("olive::PreferencesBehaviorTab", text);
}
private:
struct Item {
QString text;
QString config_key;
QString tooltip;
QString tooltip = QString();
};
void AddItems(const QVector<Item> &items);
@@ -61,9 +65,9 @@ private:
QMap<QCheckBox *, QString> config_map_;
QComboBox *graphics_backend_combobox_;
Category category_;
QComboBox *graphics_backend_combobox_;
};
}
@@ -28,6 +28,7 @@
#include "common/autoscroll.h"
#include "core.h"
#include "preferencesbehaviortab.h"
namespace olive
{
@@ -167,6 +168,29 @@ PreferencesGeneralTab::PreferencesGeneralTab()
autorecovery_layout->addWidget(browse_autorecoveries, row, 1);
}
{
QGroupBox *behavior_groupbox = new QGroupBox(PreferencesBehaviorTab::BehaviorPrefTr("Behavior"));
QVBoxLayout *behavior_layout = new QVBoxLayout(behavior_groupbox);
layout->addWidget(behavior_groupbox);
hover_focus_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Enable hover focus"));
hover_focus_->setToolTip(PreferencesBehaviorTab::BehaviorPrefTr(
"Panels will be considered focused when the mouse cursor is over them without having to click them."));
hover_focus_->setChecked(OLIVE_CONFIG("HoverFocus").toBool());
behavior_layout->addWidget(hover_focus_);
slider_ladder_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Enable slider ladder"));
slider_ladder_->setChecked(OLIVE_CONFIG("UseSliderLadders").toBool());
behavior_layout->addWidget(slider_ladder_);
scroll_zooms_ = new QCheckBox(PreferencesBehaviorTab::BehaviorPrefTr("Scrolling zooms by default"));
scroll_zooms_->setToolTip(PreferencesBehaviorTab::BehaviorPrefTr(
"By default, scrolling will move the view around, and holding Ctrl/Cmd will make it zoom instead. "
"Enabling this will switch those, scrolling will zoom by default, and holding Ctrl/Cmd will move the view instead."));
scroll_zooms_->setChecked(OLIVE_CONFIG("ScrollZooms").toBool());
behavior_layout->addWidget(scroll_zooms_);
}
layout->addStretch();
}
@@ -201,6 +225,10 @@ void PreferencesGeneralTab::Accept(MultiUndoCommand *command)
QVariant::fromValue(autorecovery_maximum_->GetValue());
Core::instance()->SetAutorecoveryInterval(
autorecovery_interval_->GetValue());
OLIVE_CONFIG("HoverFocus") = hover_focus_->isChecked();
OLIVE_CONFIG("UseSliderLadders") = slider_ladder_->isChecked();
OLIVE_CONFIG("ScrollZooms") = scroll_zooms_->isChecked();
}
void PreferencesGeneralTab::AddLanguage(const QString &locale_name)
@@ -57,6 +57,10 @@ private:
IntegerSlider *autorecovery_interval_;
IntegerSlider *autorecovery_maximum_;
QCheckBox *hover_focus_;
QCheckBox *slider_ladder_;
QCheckBox *scroll_zooms_;
};
}