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
aca33684
Commit
aca33684
authored
Jan 01, 2022
by
Julius Künzel
Browse files
[Splash] Add KDE Branding, cleanup unused files
parent
54b6c449
Pipeline
#116869
failed with stage
in 30 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
data/pics/kde-logo.png
0 → 100644
View file @
aca33684
691 Bytes
src/dialogs/splash.cpp
View file @
aca33684
...
...
@@ -5,11 +5,16 @@
#include "splash.hpp"
#include <QStyle>
#include <QPainter>
#include <KLocalizedString>
#include <QDebug>
Splash
::
Splash
(
const
QPixmap
&
pixmap
)
:
QSplashScreen
(
pixmap
)
Splash
::
Splash
()
:
QSplashScreen
()
,
m_progress
(
0
)
{
QPixmap
pixmap
(
":/pics/splash-background.png"
);
// Set style for progressbar...
m_pbStyle
.
initFrom
(
this
);
m_pbStyle
.
state
=
QStyle
::
State_Enabled
;
...
...
@@ -19,6 +24,16 @@ Splash::Splash(const QPixmap &pixmap)
m_pbStyle
.
progress
=
0
;
m_pbStyle
.
invertedAppearance
=
false
;
m_pbStyle
.
rect
=
QRect
(
4
,
pixmap
.
height
()
-
24
,
pixmap
.
width
()
/
2
,
20
);
// Where is it.
// Add KDE branding to pixmap
QPainter
*
paint
=
new
QPainter
(
&
pixmap
);
paint
->
setPen
(
Qt
::
white
);
QPixmap
kde
(
":/pics/kde-logo.png"
);
const
int
logoSize
=
32
;
QPoint
pos
(
12
,
12
);
paint
->
drawPixmap
(
pos
.
x
(),
pos
.
y
(),
logoSize
,
logoSize
,
kde
);
paint
->
drawText
(
pos
.
x
()
+
logoSize
,
pos
.
y
()
+
(
logoSize
/
2
)
+
paint
->
fontMetrics
().
strikeOutPos
(),
i18n
(
"Made by KDE"
));
setPixmap
(
pixmap
);
}
...
...
src/dialogs/splash.hpp
View file @
aca33684
...
...
@@ -14,7 +14,7 @@ class Splash : public QSplashScreen
Q_OBJECT
public:
explicit
Splash
(
const
QPixmap
&
pixmap
);
explicit
Splash
();
//~Splash();
public
slots
:
...
...
src/icons.qrc
View file @
aca33684
...
...
@@ -2,6 +2,7 @@
<qresource prefix="pics">
<file alias="kdenlive.png">../data/icons/48-apps-kdenlive.png</file>
<file alias="kdenlive-logo.png">../data/pics/kdenlive-logo.png</file>
<file alias="kde-logo.png">../data/pics/kde-logo.png</file>
<file alias="splash-background.png">../data/pics/splash-background.png</file>
</qresource>
</RCC>
src/main.cpp
View file @
aca33684
...
...
@@ -94,9 +94,8 @@ int main(int argc, char *argv[])
app
.
setWindowIcon
(
QIcon
(
QStringLiteral
(
":/pics/kdenlive.png"
)));
KLocalizedString
::
setApplicationDomain
(
"kdenlive"
);
QPixmap
pixmap
(
":/pics/splash-background.png"
);
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
Splash
splash
(
pixmap
)
;
Splash
splash
;
qApp
->
processEvents
(
QEventLoop
::
AllEvents
);
splash
.
showMessage
(
i18n
(
"Version %1"
,
QString
(
KDENLIVE_VERSION
)),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
Qt
::
white
);
splash
.
show
();
...
...
src/qml/CMakeLists.txt
deleted
100644 → 0
View file @
54b6c449
set
(
kdenlive_SRCS
${
kdenlive_SRCS
}
PARENT_SCOPE
)
src/qml/splash.qml
deleted
100644 → 0
View file @
54b6c449
/*
SPDX-FileCopyrightText: 2017 Nicolas Carion
SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
import
QtQuick
2.11
import
QtQuick
.
Controls
1.4
import
QtQuick
.
Window
2.2
import
QtQuick
.
Layouts
1.11
import
QtQuick
.
Controls
.
Styles
1.4
Window
{
id
:
splash
objectName
:
"
splash
"
color
:
"
transparent
"
title
:
"
Splash Window
"
SystemPalette
{
id
:
activePalette
}
modality
:
Qt
.
ApplicationModal
flags
:
Qt
.
SplashScreen
property
int
timeoutInterval
:
2000
signal
timeout
x
:
(
Screen
.
width
-
splashContent
.
width
)
/
2
y
:
(
Screen
.
height
-
splashContent
.
height
)
/
2
width
:
splashContent
.
width
height
:
splashContent
.
height
property
int
border
:
10
property
bool
splashing
:
true
function
endSplash
()
{
console
.
log
(
"
ending splash
"
)
splash
.
splashing
=
false
;
splash
.
close
();
}
Rectangle
{
id
:
splashContent
height
:
Screen
.
height
/
2
width
:
Screen
.
width
/
3
border.width
:
splash
.
border
border.color
:
"
#bfbfbf
"
color
:
"
#31363b
"
Image
{
id
:
logo
anchors.left
:
splashContent
.
left
anchors.top
:
splashContent
.
top
anchors.margins
:
50
// anchors.horizontalCenter: splashContent.horizontalCenter
source
:
"
qrc:/pics/kdenlive-logo.png
"
fillMode
:
Image
.
PreserveAspectFit
height
:
splashContent
.
height
/
5
-
100
}
RowLayout
{
//anchors.horizontalCenter: splashContent.horizontalCenter
anchors.bottom
:
logo
.
bottom
anchors.right
:
splashContent
.
right
anchors.rightMargin
:
logo
.
x
spacing
:
100
Text
{
color
:
"
white
"
text
:
i18n
(
"
Website
"
)
font.bold
:
true
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignBottom
}
Text
{
color
:
"
white
"
text
:
i18n
(
"
Donate
"
)
font.bold
:
true
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignBottom
}
Text
{
color
:
"
white
"
text
:
i18n
(
"
Forum
"
)
font.bold
:
true
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignBottom
}
}
Rectangle
{
id
:
recentProjects
y
:
splashContent
.
height
/
5
anchors.left
:
splashContent
.
left
anchors.leftMargin
:
splash
.
border
anchors.right
:
splashContent
.
right
anchors.rightMargin
:
splash
.
border
color
:
"
#232629
"
height
:
3
*
splashContent
.
height
/
5
width
:
splashContent
.
width
visible
:
!
splashing
Text
{
id
:
txtProject
color
:
"
#f38577
"
text
:
i18n
(
"
Recent Projects
"
)
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
anchors.topMargin
:
50
anchors.leftMargin
:
100
font.bold
:
true
}
}
Image
{
id
:
splash_img
y
:
splashContent
.
height
/
5
anchors.left
:
splashContent
.
left
anchors.leftMargin
:
splash
.
border
anchors.right
:
splashContent
.
right
anchors.rightMargin
:
splash
.
border
height
:
3
*
splashContent
.
height
/
5
width
:
splashContent
.
width
source
:
"
qrc:/pics/splash-background.png
"
fillMode
:
Image
.
PreserveAspectFit
visible
:
splashing
}
/*Text {
id:txtProject
color: "#f38577"
text: "Recent Projects"
anchors.horizontalCenter: splashContent.horizontalCenter
anchors.top: logo.bottom
anchors.topMargin: 50
font.bold: true
}
Rectangle {
id:recentProjects
border.width:5
border.color:"#efefef"
color: "#fafafa"
height: splashContent.height / 4
width: 5*splashContent.width/6
anchors.horizontalCenter: splashContent.horizontalCenter
anchors.top: txtProject.bottom
anchors.topMargin: 5
}*/
Item
{
anchors.left
:
splashContent
.
left
anchors.right
:
splashContent
.
right
anchors.bottom
:
splashContent
.
bottom
anchors.top
:
recentProjects
.
bottom
anchors.margins
:
50
visible
:
!
splashing
CheckBox
{
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
style
:
CheckBoxStyle
{
indicator
:
Rectangle
{
implicitWidth
:
32
implicitHeight
:
32
radius
:
3
//border.color: control.activeFocus ? "darkblue" : "gray"
border.width
:
1
border.color
:
"
white
"
color
:
"
#4d4d4d
"
Rectangle
{
visible
:
control
.
checked
color
:
"
#555
"
border.color
:
"
#333
"
radius
:
1
anchors.margins
:
4
anchors.fill
:
parent
}
}
label
:
Text
{
text
:
i18n
(
"
Hide on startup
"
)
color
:
"
white
"
}
}
}
Row
{
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
spacing
:
50
visible
:
!
splashing
Button
{
iconSource
:
"
image://icon/document-new
"
text
:
i18n
(
"
New
"
)
//style: CustomButton {
// backColor: splashContent.color
// }
}
Button
{
iconSource
:
"
image://icon/document-open
"
text
:
i18n
(
"
Open
"
)
//style: CustomButton {
// backColor: splashContent.color
// }
}
}
}
MouseArea
{
id
:
clickZone
anchors.fill
:
splashContent
onClicked
:
{
console
.
log
(
"
clic
"
);
splash
.
close
();
}
}
}
Component.onCompleted
:
{
visible
=
true
clickZone
.
focus
=
true
;
}
}
Write
Preview
Supports
Markdown
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