Merge branch 'master' of https://github.com/unfa/olive
This commit is contained in:
+2
-2
@@ -8,11 +8,11 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
|
||||
if [ "$ARCH" == "x86_64" ]; then
|
||||
sudo apt-get -y install qt59base qt59multimedia qt59svg libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev frei0r-plugins-dev frei0r-plugins fuse curl
|
||||
sudo apt-get -y install qt59base qt59multimedia qt59svg libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev frei0r-plugins-dev fuse curl
|
||||
fi
|
||||
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
sudo apt-get -y install gcc-multilib g++-multilib qt59base:i386 qt59multimedia:i386 qt59svg:i386 libavformat-dev:i386 libavcodec-dev:i386 libavfilter-dev:i386 libavutil-dev:i386 libswscale-dev:i386 libswresample-dev:i386 frei0r-plugins-dev:i386 frei0r-plugins:i386 pkg-config:i386 libgl1-mesa-dev:i386 fuse:i386 curl
|
||||
sudo apt-get -y install gcc-multilib g++-multilib qt59base:i386 qt59multimedia:i386 qt59svg:i386 libavformat-dev:i386 libavcodec-dev:i386 libavfilter-dev:i386 libavutil-dev:i386 libswscale-dev:i386 libswresample-dev:i386 frei0r-plugins-dev:i386 pkg-config:i386 libgl1-mesa-dev:i386 fuse:i386 curl
|
||||
fi
|
||||
source /opt/qt*/bin/qt*-env.sh
|
||||
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ set(OLIVE_DEFINITIONS -DQT_DEPRECATED_WARNINGS)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT DEFINED OpenGL_GL_PREFERENCE)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
@@ -64,8 +64,8 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
# Fallback for Ubuntu/Launchpad (extracts Git hash from debian/changelog rather than Git repo)
|
||||
# (see https://answers.launchpad.net/launchpad/+question/678556)
|
||||
execute_process(COMMAND sh debian/gitfromlog.sh debian/changelog
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
execute_process(COMMAND sh -c "grep -Po '(?<=-)(([a-z0-9])\\w+)(?=\\+)' -m 1 changelog"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/debian
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
+26
-2
@@ -1,13 +1,37 @@
|
||||
[If you are requesting a feature, please try to fill out all the information below. If you are reporting a bug, you can clear the template below.]
|
||||
|
||||
[If you are reporting a bug, please try to fill out all the information below. If you are requesting a feature, you can clear this template.]
|
||||
### I have read the following
|
||||
|
||||
- [ ] The [Olive Wiki](https://github.com/olive-editor/olive/wiki)
|
||||
|
||||
- [ ] Previous issues that include ["FR"](https://github.com/olive-editor/olive/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+FR)or ["Feature Request"](https://github.com/olive-editor/olive/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+Feature+Request)
|
||||
|
||||
- [ ] Olive's [Project Goals](https://github.com/olive-editor/olive/projects)
|
||||
|
||||
### Detailed description of the feature request
|
||||
|
||||
[Describe the feature request to the best of your ability. Do you know any libraries/sources that can help the Olive Team include the feature?]
|
||||
|
||||
### Why should Olive include the feature? What are the benefits?
|
||||
|
||||
[Explain the feature's importance to Olive and NLEs in general.]
|
||||
|
||||
---
|
||||
|
||||
[If you are reporting a bug, please try to fill out all the information below. If you are requesting a feature, you can clear the template above.]
|
||||
|
||||
### System Information
|
||||
|
||||
**Olive version:** [e.g. Git hash from window title or Help > About]
|
||||
|
||||
**Source:** [e.g. AppImage, Website etc.]
|
||||
|
||||
**Operating system:** [e.g. Ubuntu 18.04 64-bit]
|
||||
|
||||
**CPU:** [e.g. Intel i5-4300U]
|
||||
|
||||
**RAM:** [e.g. 8GB]
|
||||
|
||||
**GPU:** [e.g. NVIDIA Geforce GT 1030 2GB (Driver ver xxx.xx.xx)]
|
||||
|
||||
### Detailed Description
|
||||
@@ -28,4 +52,4 @@
|
||||
|
||||
```
|
||||
[If you can reproduce this issue, try running Olive through GDB and retrieving a backtrace, then paste the backtrace here. Instructions are available in the Wiki on how to acquire this backtrace.]
|
||||
```
|
||||
```
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ Source: olive-editor
|
||||
Section: video
|
||||
Priority: optional
|
||||
Maintainer: Olive Team <itsmattkc@gmail.com>
|
||||
Build-Depends: debhelper (>=9), build-essential, qt5-default, qtmultimedia5-dev, libqt5opengl5-dev, libqt5svg5-dev, libqt5multimedia5-plugins, libavformat-dev, libavcodec-dev, libavutil-dev, libswscale-dev, libswresample-dev, libavfilter-dev, libpostproc-dev, git, frei0r-plugins-dev, qttools5-dev-tools
|
||||
Build-Depends: debhelper (>=9), build-essential, qt5-default, qtmultimedia5-dev, libqt5opengl5-dev, libqt5svg5-dev, libqt5multimedia5-plugins, libavformat-dev, libavcodec-dev, libavutil-dev, libswscale-dev, libswresample-dev, libavfilter-dev, libpostproc-dev, git, frei0r-plugins-dev, qttools5-dev-tools, cmake, qttools5-dev
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://olivevideoeditor.org/
|
||||
|
||||
|
||||
@@ -572,11 +572,11 @@ void ExportDialog::StartExport() {
|
||||
// Close all effects in effect controls (prevents UI threading issues)
|
||||
panel_effect_controls->Clear();
|
||||
|
||||
olive::Global->set_rendering_state(true);
|
||||
|
||||
// Close all currently open clips
|
||||
close_active_clips(olive::ActiveSequence.get());
|
||||
|
||||
olive::Global->set_rendering_state(true);
|
||||
|
||||
olive::Global->save_autorecovery_file();
|
||||
|
||||
prep_ui_for_render(true);
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
uniform sampler2D sceneTex; // 0
|
||||
uniform float lensRadiusX;
|
||||
uniform float lensRadiusY;
|
||||
uniform float centerX;
|
||||
uniform float centerY;
|
||||
uniform bool circular;
|
||||
uniform vec2 resolution;
|
||||
// uniform vec2 lensRadius; // 0.45, 0.38
|
||||
@@ -20,7 +22,7 @@ void main(void) {
|
||||
vignetteCoord.x *= ar;
|
||||
vignetteCoord.x -= (1.0-(1.0/ar));
|
||||
}
|
||||
float dist = distance(vignetteCoord, vec2(0.5,0.5));
|
||||
float dist = distance(vignetteCoord, vec2(0.5 + centerX*0.01, 0.5 + centerY*0.01));
|
||||
float size = (lensRadiusX*0.01);
|
||||
c *= smoothstep(size, size*0.99*(1.0-lensRadiusY*0.01), dist);
|
||||
gl_FragColor = c;
|
||||
|
||||
@@ -9,5 +9,9 @@
|
||||
<row name="Circular">
|
||||
<field type="bool" default="false" id="circular"/>
|
||||
</row>
|
||||
<row name="Center">
|
||||
<field type="double" default="0" id="centerX"/>
|
||||
<field type="double" default="0" id="centerY"/>
|
||||
</row>
|
||||
<shader vert="common.vert" frag="vignette.frag"/>
|
||||
</effect>
|
||||
+6
-1
@@ -78,7 +78,8 @@ Config::Config()
|
||||
default_sequence_height(1080),
|
||||
default_sequence_framerate(29.97),
|
||||
default_sequence_audio_frequency(48000),
|
||||
default_sequence_audio_channel_layout(3)
|
||||
default_sequence_audio_channel_layout(3),
|
||||
locked_panels(false)
|
||||
{}
|
||||
|
||||
void Config::load(QString path) {
|
||||
@@ -239,6 +240,9 @@ void Config::load(QString path) {
|
||||
} else if (stream.name() == "DefaultSequenceAudioLayout") {
|
||||
stream.readNext();
|
||||
default_sequence_audio_channel_layout = stream.text().toInt();
|
||||
} else if (stream.name() == "LockedPanels") {
|
||||
stream.readNext();
|
||||
locked_panels = (stream.text() == "1");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -313,6 +317,7 @@ void Config::save(QString path) {
|
||||
stream.writeTextElement("DefaultSequenceFrameRate", QString::number(default_sequence_framerate));
|
||||
stream.writeTextElement("DefaultSequenceAudioFrequency", QString::number(default_sequence_audio_frequency));
|
||||
stream.writeTextElement("DefaultSequenceAudioLayout", QString::number(default_sequence_audio_channel_layout));
|
||||
stream.writeTextElement("LockedPanels", QString::number(locked_panels));
|
||||
|
||||
stream.writeEndElement(); // configuration
|
||||
stream.writeEndDocument(); // doc
|
||||
|
||||
@@ -558,6 +558,11 @@ struct Config {
|
||||
*/
|
||||
int default_sequence_audio_channel_layout;
|
||||
|
||||
/**
|
||||
* @brief Sets whether panels should load locked or not
|
||||
*/
|
||||
bool locked_panels;
|
||||
|
||||
/**
|
||||
* @brief Load config from file
|
||||
*
|
||||
|
||||
+1
-1
@@ -669,7 +669,7 @@ void Viewer::setup_ui() {
|
||||
lower_control_layout->setMargin(0);
|
||||
|
||||
QSizePolicy timecode_container_policy(QSizePolicy::Minimum, QSizePolicy::Maximum);
|
||||
QSizePolicy lower_control_policy(QSizePolicy::Expanding, QSizePolicy::Maximum);
|
||||
QSizePolicy lower_control_policy(QSizePolicy::Maximum, QSizePolicy::Maximum);
|
||||
|
||||
// Current time code container
|
||||
QWidget* current_timecode_container = new QWidget();
|
||||
|
||||
@@ -166,8 +166,7 @@ bool Sequence::IsClipSelected(Clip *clip, bool containing)
|
||||
for (int i=0;i<selections.size();i++) {
|
||||
const Selection& s = selections.at(i);
|
||||
if (clip->track() == s.track && ((clip->timeline_in() >= s.in && clip->timeline_out() <= s.out)
|
||||
|| (!containing && !(clip->timeline_in() < s.in && clip->timeline_out() < s.in)
|
||||
&& !(clip->timeline_in() > s.in && clip->timeline_out() > s.in)))) {
|
||||
|| (!containing && !(clip->timeline_in() >= s.out || clip->timeline_out() <= s.in)))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+1180
-687
File diff suppressed because it is too large
Load Diff
+1199
-919
File diff suppressed because it is too large
Load Diff
+2539
-2090
File diff suppressed because it is too large
Load Diff
+1182
-717
File diff suppressed because it is too large
Load Diff
+1181
-946
File diff suppressed because it is too large
Load Diff
+1180
-687
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -709,7 +709,7 @@
|
||||
<translation>tidak dapat menulis header untuk file keluaran (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="599"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="600"/>
|
||||
<source>could not write output file trailer (%1)</source>
|
||||
<translation>tidak dapat menulis trailer untuk file keluaran (%1)</translation>
|
||||
</message>
|
||||
|
||||
+1
-1
@@ -713,7 +713,7 @@
|
||||
<translation>impossibile scrivere l'intestazione del file di output (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="604"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="600"/>
|
||||
<source>could not write output file trailer (%1)</source>
|
||||
<translation>impossibile scrivere la fine del file d'output (%1)</translation>
|
||||
</message>
|
||||
|
||||
+30
-30
@@ -349,42 +349,42 @@
|
||||
<translation>%1 (закрывается)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="157"/>
|
||||
<location filename="../ui/effectui.cpp" line="158"/>
|
||||
<source>%1 (multiple)</source>
|
||||
<translation>%1 (больше одного)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="285"/>
|
||||
<location filename="../ui/effectui.cpp" line="286"/>
|
||||
<source>Cu&t</source>
|
||||
<translation>В&ырезать</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="288"/>
|
||||
<location filename="../ui/effectui.cpp" line="289"/>
|
||||
<source>&Copy</source>
|
||||
<translation>&Скопировать</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="299"/>
|
||||
<location filename="../ui/effectui.cpp" line="300"/>
|
||||
<source>Move &Up</source>
|
||||
<translation>&Поднять</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="303"/>
|
||||
<location filename="../ui/effectui.cpp" line="304"/>
|
||||
<source>Move &Down</source>
|
||||
<translation>&Опустить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="308"/>
|
||||
<location filename="../ui/effectui.cpp" line="309"/>
|
||||
<source>D&elete</source>
|
||||
<translation>&Удалить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="325"/>
|
||||
<location filename="../ui/effectui.cpp" line="326"/>
|
||||
<source>Load Settings From File</source>
|
||||
<translation>Загрузить параметры из файла</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/effectui.cpp" line="327"/>
|
||||
<location filename="../ui/effectui.cpp" line="328"/>
|
||||
<source>Save Settings to File</source>
|
||||
<translation>Сохранить параметры в файл</translation>
|
||||
</message>
|
||||
@@ -595,87 +595,87 @@
|
||||
<context>
|
||||
<name>ExportThread</name>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="78"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="79"/>
|
||||
<source>failed to send frame to encoder (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="89"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="90"/>
|
||||
<source>failed to receive packet from encoder (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="121"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="113"/>
|
||||
<source>could not video encoder for %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="130"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="122"/>
|
||||
<source>could not allocate video stream</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="139"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="131"/>
|
||||
<source>could not allocate video encoding context</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="188"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="180"/>
|
||||
<source>could not open output video encoder (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="196"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="188"/>
|
||||
<source>could not copy video encoder parameters to output stream (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="233"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="227"/>
|
||||
<source>could not audio encoder for %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="241"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="235"/>
|
||||
<source>could not allocate audio stream</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="255"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="249"/>
|
||||
<source>could not allocate audio encoding context</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="280"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="274"/>
|
||||
<source>could not open output audio encoder (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="288"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="282"/>
|
||||
<source>could not copy audio encoder parameters to output stream (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="325"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="319"/>
|
||||
<source>could not allocate audio buffer (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="356"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="350"/>
|
||||
<source>could not create output format context</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="366"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="360"/>
|
||||
<source>could not open output file (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="402"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="396"/>
|
||||
<source>could not write output file header (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="603"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="600"/>
|
||||
<source>could not write output file trailer (%1)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -778,7 +778,7 @@
|
||||
<context>
|
||||
<name>KeyframeNavigator</name>
|
||||
<message>
|
||||
<location filename="../ui/keyframenavigator.cpp" line="71"/>
|
||||
<location filename="../ui/keyframenavigator.cpp" line="77"/>
|
||||
<source>Enable Keyframes</source>
|
||||
<translation>Включить ключевые кадры</translation>
|
||||
</message>
|
||||
@@ -3275,7 +3275,7 @@ Audio Layout: %6</source>
|
||||
<context>
|
||||
<name>TimelineHeader</name>
|
||||
<message>
|
||||
<location filename="../ui/timelineheader.cpp" line="482"/>
|
||||
<location filename="../ui/timelineheader.cpp" line="486"/>
|
||||
<source>Center Timecodes</source>
|
||||
<translation>Центрировать тайм-код</translation>
|
||||
</message>
|
||||
@@ -3528,17 +3528,17 @@ Duration: %4</source>
|
||||
<translation>Просмотр проекта</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../panels/viewer.cpp" line="610"/>
|
||||
<location filename="../panels/viewer.cpp" line="601"/>
|
||||
<source>(none)</source>
|
||||
<translation>(нет)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../panels/viewer.cpp" line="746"/>
|
||||
<location filename="../panels/viewer.cpp" line="737"/>
|
||||
<source>Drag video only</source>
|
||||
<translation>Перетаскивать только видео</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../panels/viewer.cpp" line="753"/>
|
||||
<location filename="../panels/viewer.cpp" line="744"/>
|
||||
<source>Drag audio only</source>
|
||||
<translation>Перетаскивать только звук</translation>
|
||||
</message>
|
||||
|
||||
+1199
-919
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -686,7 +686,7 @@
|
||||
<translation>не вдалося записати заголовок вихідного файлу (%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../rendering/exportthread.cpp" line="604"/>
|
||||
<location filename="../rendering/exportthread.cpp" line="600"/>
|
||||
<source>could not write output file trailer (%1)</source>
|
||||
<translatorcomment>Уточнити</translatorcomment>
|
||||
<translation>не вдалося записати кінець вихідного файла (%1)</translation>
|
||||
|
||||
@@ -279,6 +279,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
olive::Global->check_for_autorecovery_file();
|
||||
|
||||
// lock panels if the config says so
|
||||
set_panels_locked(olive::CurrentConfig.locked_panels);
|
||||
|
||||
// set up output audio device
|
||||
init_audio();
|
||||
|
||||
@@ -1188,6 +1191,8 @@ void MainWindow::set_panels_locked(bool locked)
|
||||
panel->setTitleBarWidget(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
olive::CurrentConfig.locked_panels = locked;
|
||||
}
|
||||
|
||||
void MainWindow::fileMenu_About_To_Be_Shown() {
|
||||
|
||||
@@ -32,8 +32,11 @@ TextEditEx::TextEditEx(QWidget *parent, bool enable_rich_text) :
|
||||
enable_rich_text_(enable_rich_text)
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
|
||||
text_editor_ = new QTextEdit();
|
||||
text_editor_->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding);
|
||||
connect(text_editor_, SIGNAL(textChanged()), this, SLOT(queue_text_modified()));
|
||||
layout->addWidget(text_editor_);
|
||||
|
||||
|
||||
+15
-10
@@ -2513,8 +2513,8 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
|
||||
// threshold around a trim point that the cursor can be within and still considered "trimming"
|
||||
int lim = 5;
|
||||
long mouse_frame_lower = panel_timeline->getTimelineFrameFromScreenPoint(pos.x()-lim)-1;
|
||||
long mouse_frame_upper = panel_timeline->getTimelineFrameFromScreenPoint(pos.x()+lim)+1;
|
||||
int mouse_frame_lower = pos.x() - lim;
|
||||
int mouse_frame_upper = pos.x() + lim;
|
||||
|
||||
// used to determine whether we the cursor found a trim point or not
|
||||
bool found = false;
|
||||
@@ -2576,11 +2576,14 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
}
|
||||
}
|
||||
|
||||
int visual_in_point = panel_timeline->getTimelineScreenPointFromFrame(c->timeline_in());
|
||||
int visual_out_point = panel_timeline->getTimelineScreenPointFromFrame(c->timeline_out());
|
||||
|
||||
// is the cursor hovering around the clip's IN point?
|
||||
if (c->timeline_in() > mouse_frame_lower && c->timeline_in() < mouse_frame_upper) {
|
||||
if (visual_in_point > mouse_frame_lower && visual_in_point < mouse_frame_upper) {
|
||||
|
||||
// test how close this IN point is to the cursor
|
||||
int nc = qAbs(c->timeline_in() + 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(visual_in_point + 1 - pos.x());
|
||||
|
||||
// and test whether it's closer than the last in/out point we found
|
||||
if (nc < closeness) {
|
||||
@@ -2595,10 +2598,10 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
}
|
||||
|
||||
// is the cursor hovering around the clip's OUT point?
|
||||
if (c->timeline_out() > mouse_frame_lower && c->timeline_out() < mouse_frame_upper) {
|
||||
if (visual_out_point > mouse_frame_lower && visual_out_point < mouse_frame_upper) {
|
||||
|
||||
// test how close this OUT point is to the cursor
|
||||
int nc = qAbs(c->timeline_out() - 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(visual_out_point - 1 - pos.x());
|
||||
|
||||
// and test whether it's closer than the last in/out point we found
|
||||
if (nc < closeness) {
|
||||
@@ -2620,13 +2623,14 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
if (c->opening_transition != nullptr) {
|
||||
|
||||
// cache the timeline frame where the transition ends
|
||||
long transition_point = c->timeline_in() + c->opening_transition->get_true_length();
|
||||
int transition_point = panel_timeline->getTimelineScreenPointFromFrame(c->timeline_in()
|
||||
+ c->opening_transition->get_true_length());
|
||||
|
||||
// check if the cursor is hovering around it (within the threshold)
|
||||
if (transition_point > mouse_frame_lower && transition_point < mouse_frame_upper) {
|
||||
|
||||
// similar to above, test how close it is and if it's closer, make this active
|
||||
int nc = qAbs(transition_point - 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(transition_point - 1 - pos.x());
|
||||
if (nc < closeness) {
|
||||
panel_timeline->trim_target = i;
|
||||
panel_timeline->trim_type = TRIM_OUT;
|
||||
@@ -2641,13 +2645,14 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
if (c->closing_transition != nullptr) {
|
||||
|
||||
// cache the timeline frame where the transition starts
|
||||
long transition_point = c->timeline_out() - c->closing_transition->get_true_length();
|
||||
int transition_point = panel_timeline->getTimelineScreenPointFromFrame(c->timeline_out()
|
||||
- c->closing_transition->get_true_length());
|
||||
|
||||
// check if the cursor is hovering around it (within the threshold)
|
||||
if (transition_point > mouse_frame_lower && transition_point < mouse_frame_upper) {
|
||||
|
||||
// similar to above, test how close it is and if it's closer, make this active
|
||||
int nc = qAbs(transition_point + 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(transition_point + 1 - pos.x());
|
||||
if (nc < closeness) {
|
||||
panel_timeline->trim_target = i;
|
||||
panel_timeline->trim_type = TRIM_IN;
|
||||
|
||||
Reference in New Issue
Block a user