Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
87dc2b1d
Commit
87dc2b1d
authored
Jul 23, 2020
by
Jean-Baptiste Mardelle
Browse files
When trying to play a monitor that is hidden, display an info message allowing to show the monitor.
Fixes
#762
parent
d722dc28
Pipeline
#28119
passed with stage
in 26 minutes and 9 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
87dc2b1d
...
...
@@ -3715,9 +3715,16 @@ void MainWindow::slotChangeStyle(QAction *a)
KdenliveSettings
::
setWidgetstyle
(
style
);
doChangeStyle
();
// Monitor refresh is necessary
if
(
pCore
->
monitorManager
()
->
isActive
(
Kdenlive
::
ClipMonitor
))
{
raiseMonitor
(
pCore
->
monitorManager
()
->
isActive
(
Kdenlive
::
ClipMonitor
));
}
void
MainWindow
::
raiseMonitor
(
bool
clipMonitor
)
{
if
(
clipMonitor
)
{
m_clipMonitorDock
->
show
();
m_clipMonitorDock
->
raise
();
}
else
{
m_projectMonitorDock
->
show
();
m_projectMonitorDock
->
raise
();
}
}
...
...
src/mainwindow.h
View file @
87dc2b1d
...
...
@@ -131,6 +131,9 @@ public:
/** @brief Returns true if the timeline widget is visible */
bool
timelineVisible
()
const
;
/** @brief Raise (show) the clip or project monitor */
void
raiseMonitor
(
bool
clipMonitor
);
protected:
/** @brief Closes the window.
...
...
src/monitor/monitormanager.cpp
View file @
87dc2b1d
...
...
@@ -154,6 +154,7 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
m_clipMonitor
->
parentWidget
()
->
raise
();
}
if
(
!
m_clipMonitor
->
isVisible
())
{
pCore
->
displayMessage
(
i18n
(
"Do you want to <a href=
\"
#clipmonitor
\"
>show the clip monitor</a> to view timeline?"
),
MessageType
::
InformationMessage
);
m_activeMonitor
=
m_projectMonitor
;
return
false
;
}
...
...
@@ -165,6 +166,7 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
m_projectMonitor
->
parentWidget
()
->
raise
();
}
if
(
!
m_projectMonitor
->
isVisible
())
{
pCore
->
displayMessage
(
i18n
(
"Do you want to <a href=
\"
#projectmonitor
\"
>show the project monitor</a> to view timeline?"
),
MessageType
::
InformationMessage
);
m_activeMonitor
=
m_clipMonitor
;
return
false
;
}
...
...
src/statusbarmessagelabel.cpp
View file @
87dc2b1d
...
...
@@ -23,6 +23,8 @@
#include "statusbarmessagelabel.h"
#include "kdenlivesettings.h"
#include "core.h"
#include "mainwindow.h"
#include <KNotification>
#include <kcolorscheme.h>
...
...
@@ -220,7 +222,7 @@ bool StatusBarMessageLabel::slotMessageTimeout()
iconName
=
"dialog-information"
;
m_pixmap
->
setCursor
(
Qt
::
ArrowCursor
);
QPropertyAnimation
*
anim
=
new
QPropertyAnimation
(
this
,
"color"
,
this
);
anim
->
setDuration
(
15
00
);
anim
->
setDuration
(
30
00
);
anim
->
setEasingCurve
(
QEasingCurve
::
InOutQuad
);
anim
->
setKeyValueAt
(
0.2
,
parentWidget
()
->
palette
().
highlight
().
color
());
anim
->
setEndValue
(
parentWidget
()
->
palette
().
window
().
color
());
...
...
@@ -247,7 +249,7 @@ bool StatusBarMessageLabel::slotMessageTimeout()
anim
->
setStartValue
(
bgColor
);
anim
->
setEndValue
(
bgColor
);
anim
->
setEasingCurve
(
QEasingCurve
::
OutCubic
);
anim
->
setDuration
(
15
00
);
anim
->
setDuration
(
30
00
);
anim
->
start
(
QPropertyAnimation
::
DeleteWhenStopped
);
break
;
}
...
...
@@ -281,6 +283,18 @@ void StatusBarMessageLabel::resizeEvent(QResizeEvent *event)
void
StatusBarMessageLabel
::
slotShowJobLog
(
const
QString
&
text
)
{
// Special actions
if
(
text
.
startsWith
(
QLatin1Char
(
'#'
)))
{
if
(
text
==
QLatin1String
(
"#projectmonitor"
))
{
// Raise project monitor
pCore
->
window
()
->
raiseMonitor
(
false
);
return
;
}
else
if
(
text
==
QLatin1String
(
"#clipmonitor"
))
{
// Raise project monitor
pCore
->
window
()
->
raiseMonitor
(
true
);
return
;
}
}
QDialog
d
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
...
...
Eugen Mohr
@emohr
mentioned in issue
#772 (closed)
·
Aug 07, 2020
mentioned in issue
#772 (closed)
mentioned in issue #772
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment