Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kaidan
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Robert Maerkisch
kaidan
Commits
ede2b766
Commit
ede2b766
authored
Jul 01, 2019
by
Jonah Brüchert
🌳
Committed by
LNJ
Jul 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Qt 5.9/UT support by copying new Kirigami components
parent
de9e07b8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
467 additions
and
10 deletions
+467
-10
clickable.json
clickable.json
+2
-2
kaidan_qml.qrc
kaidan_qml.qrc
+3
-0
src/qml/GlobalDrawer.qml
src/qml/GlobalDrawer.qml
+3
-1
src/qml/elements/kirigami/InlineMessage.qml
src/qml/elements/kirigami/InlineMessage.qml
+116
-0
src/qml/elements/kirigami/templates/InlineMessage.qml
src/qml/elements/kirigami/templates/InlineMessage.qml
+306
-0
src/qml/elements/kirigami/templates/private/IconPropertiesGroup.qml
...ements/kirigami/templates/private/IconPropertiesGroup.qml
+27
-0
src/qml/settings/ChangePassword.qml
src/qml/settings/ChangePassword.qml
+8
-6
src/qml/settings/SettingsPage.qml
src/qml/settings/SettingsPage.qml
+1
-1
utils/build-linux-click.sh
utils/build-linux-click.sh
+1
-0
No files found.
clickable.json
View file @
ede2b766
...
...
@@ -11,7 +11,7 @@
"qxmpp"
:
{
"template"
:
"cmake"
,
"src_dir"
:
"3rdparty/qxmpp"
,
"make_jobs"
:
2
,
"make_jobs"
:
4
,
"build_args"
:
[
"-DCMAKE_BUILD_TYPE=Release"
,
"-DBUILD_TESTS=OFF"
,
...
...
@@ -19,7 +19,7 @@
"-DCMAKE_PREFIX_PATH=../../../bin/ubuntu-touch/tmp"
,
"-DCMAKE_INSTALL_PREFIX=../../../bin/ubuntu-touch/tmp"
],
"
postbuild"
:
"make
install"
"
make_args"
:
"
install"
}
}
}
kaidan_qml.qrc
View file @
ede2b766
...
...
@@ -25,6 +25,9 @@
<file alias="qml/elements/MediaPreviewOther.qml">src/qml/elements/MediaPreviewOther.qml</file>
<file alias="qml/elements/EmojiPicker.qml">src/qml/elements/EmojiPicker.qml</file>
<file alias="qml/elements/TextAvatar.qml">src/qml/elements/TextAvatar.qml</file>
<file alias="qml/elements/kirigami/templates/private/IconPropertiesGroup.qml">src/qml/elements/kirigami/templates/private/IconPropertiesGroup.qml</file>
<file alias="qml/elements/kirigami/templates/InlineMessage.qml">src/qml/elements/kirigami/templates/InlineMessage.qml</file>
<file alias="qml/elements/kirigami/InlineMessage.qml">src/qml/elements/kirigami/InlineMessage.qml</file>
<file alias="qml/settings/SettingsItem.qml">src/qml/settings/SettingsItem.qml</file>
<file alias="qml/settings/SettingsPage.qml">src/qml/settings/SettingsPage.qml</file>
...
...
src/qml/GlobalDrawer.qml
View file @
ede2b766
...
...
@@ -69,7 +69,9 @@ Kirigami.GlobalDrawer {
// open settings page
if
(
Kirigami
.
Settings
.
isMobile
)
{
if
(
pageStack
.
layers
.
depth
<
2
)
pageStack
.
layers
.
push
(
settingsPage
)
pageStack
.
layers
.
push
(
settingsPage
)
else
pageStack
.
layers
.
pop
()
}
else
{
settingsSheet
.
open
()
}
...
...
src/qml/elements/kirigami/InlineMessage.qml
0 → 100644
View file @
ede2b766
/*
* Copyright 2018 Eike Hein <hein@kde.org>
* Copyright 2018 Marco Martin <mart@kde.org>
* Copyright 2018 Kai Uwe Broulik <kde@privat.broulik.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import
QtQuick
2.7
import
org
.
kde
.
kirigami
2.3
as
Kirigami
import
"
templates
"
as
T
/**
* An inline message item with support for informational, positive,
* warning and error types, and with support for associated actions.
*
* InlineMessage can be used to give information to the user or
* interact with the user, without requiring the use of a dialog.
*
* The InlineMessage item is hidden by default. It also manages its
* height (and implicitHeight) during an animated reveal when shown.
* You should avoid setting height on an InlineMessage unless it is
* already visible.
*
* Optionally an icon can be set, defaulting to an icon appropriate
* to the message type otherwise.
*
* Optionally a close button can be shown.
*
* Actions are added from left to right. If more actions are set than
* can fit, an overflow menu is provided.
*
* Example:
* @code
* InlineMessage {
* type: Kirigami.MessageType.Error
*
* text: "My error message"
*
* actions: [
* Kirigami.Action {
* iconName: "edit"
* text: "Action text"
* onTriggered: {
* // do stuff
* }
* },
* Kirigami.Action {
* iconName: "edit"
* text: "Action text"
* onTriggered: {
* // do stuff
* }
* }
* ]
* }
* @endcode
*
* @since 5.45
*/
T.InlineMessage
{
id
:
root
background
:
Rectangle
{
id
:
bgBorderRect
color
:
{
if
(
root
.
type
==
Kirigami
.
MessageType
.
Positive
)
{
return
Kirigami
.
Theme
.
positiveTextColor
;
}
else
if
(
root
.
type
==
Kirigami
.
MessageType
.
Warning
)
{
return
Kirigami
.
Theme
.
neutralTextColor
;
}
else
if
(
root
.
type
==
Kirigami
.
MessageType
.
Error
)
{
return
Kirigami
.
Theme
.
negativeTextColor
;
}
return
Kirigami
.
Theme
.
activeTextColor
;
}
radius
:
Kirigami
.
Units
.
smallSpacing
/
2
Rectangle
{
id
:
bgFillRect
anchors.fill
:
parent
anchors.margins
:
Kirigami
.
Units
.
devicePixelRatio
color
:
Kirigami
.
Theme
.
backgroundColor
radius
:
bgBorderRect
.
radius
*
0.60
}
Rectangle
{
anchors.fill
:
bgFillRect
color
:
bgBorderRect
.
color
opacity
:
0.20
radius
:
bgFillRect
.
radius
}
}
}
src/qml/elements/kirigami/templates/InlineMessage.qml
0 → 100644
View file @
ede2b766
/*
* Copyright 2018 Eike Hein <hein@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import
QtQuick
2.7
import
QtQuick
.
Templates
2.0
as
T2
import
QtQuick
.
Controls
2.0
as
Controls
import
QtQuick
.
Layouts
1.0
import
org
.
kde
.
kirigami
2.5
as
Kirigami
import
"
private
"
/**
* An inline message item with support for informational, positive,
* warning and error types, and with support for associated actions.
*
* InlineMessage can be used to give information to the user or
* interact with the user, without requiring the use of a dialog.
*
* The InlineMessage item is hidden by default. It also manages its
* height (and implicitHeight) during an animated reveal when shown.
* You should avoid setting height on an InlineMessage unless it is
* already visible.
*
* Optionally an icon can be set, defaulting to an icon appropriate
* to the message type otherwise.
*
* Optionally a close button can be shown.
*
* Actions are added from left to right. If more actions are set than
* can fit, an overflow menu is provided.
*
* Example:
* @code
* InlineMessage {
* type: Kirigami.MessageType.Error
*
* text: "My error message"
*
* actions: [
* Kirigami.Action {
* iconName: "edit"
* text: "Action text"
* onTriggered: {
* // do stuff
* }
* },
* Kirigami.Action {
* iconName: "edit"
* text: "Action text"
* onTriggered: {
* // do stuff
* }
* }
* ]
* }
* @endcode
*
* @since 5.45
*/
T2.Control
{
id
:
root
visible
:
false
/**
* Emitted when a link is hovered in the message text.
* @param The hovered link.
*/
signal
linkHovered
(
string
link
)
/**
* Emitted when a link is clicked or tapped in the message text.
* @param The clicked or tapped link.
*/
signal
linkActivated
(
string
link
)
/**
* type: int
* The message type. One of Information, Positive, Warning or Error.
*
* The default is Kirigami.MessageType.Information.
*/
property
int
type
:
Kirigami
.
MessageType
.
Information
/**
* A grouped property describing an optional icon.
* * source: The source of the icon, a freedesktop-compatible icon name is recommended.
* * color: An optional tint color for the icon.
*
* If no custom icon is set, an icon appropriate to the message type
* is shown.
*/
property
IconPropertiesGroup
icon
:
IconPropertiesGroup
{}
/**
* text: string
* The message text.
*/
property
string
text
/**
* showCloseButton: bool
* When enabled, a close button is shown.
* The default is false.
*/
property
bool
showCloseButton
:
false
/**
* actions: list<Action>
* The list of actions to show. Actions are added from left to
* right. If more actions are set than can fit, an overflow menu is
* provided.
*/
property
list
<
QtObject
>
actions
/**
* animating: bool
* True while the message item is animating.
*/
readonly
property
bool
animating
:
hasOwnProperty
(
"
_animating
"
)
&&
_animating
implicitHeight
:
visible
?
contentLayout
.
implicitHeight
+
(
2
*
(
background
.
border
.
width
+
Kirigami
.
Units
.
smallSpacing
))
:
0
property
bool
_animating
:
false
leftPadding
:
background
.
border
.
width
+
Kirigami
.
Units
.
smallSpacing
topPadding
:
background
.
border
.
width
+
Kirigami
.
Units
.
smallSpacing
rightPadding
:
background
.
border
.
width
+
Kirigami
.
Units
.
smallSpacing
bottomPadding
:
background
.
border
.
width
+
Kirigami
.
Units
.
smallSpacing
Behavior
on
implicitHeight
{
enabled
:
!
root
.
visible
SequentialAnimation
{
PropertyAction
{
targets
:
root
;
property
:
"
_animating
"
;
value
:
true
}
NumberAnimation
{
duration
:
Kirigami
.
Units
.
longDuration
}
}
}
onVisibleChanged
:
{
if
(
!
visible
)
{
contentLayout
.
opacity
=
0.0
;
}
}
opacity
:
visible
?
1.0
:
0.0
Behavior
on
opacity
{
enabled
:
!
root
.
visible
NumberAnimation
{
duration
:
Kirigami
.
Units
.
shortDuration
}
}
onOpacityChanged
:
{
if
(
opacity
==
0.0
)
{
contentLayout
.
opacity
=
0.0
;
}
else
if
(
opacity
==
1.0
)
{
contentLayout
.
opacity
=
1.0
;
}
}
onImplicitHeightChanged
:
{
height
=
implicitHeight
;
}
contentItem
:
GridLayout
{
id
:
contentLayout
// Used to defer opacity animation until we know if InlineMessage was
// initialized visible.
property
bool
complete
:
false
Behavior
on
opacity
{
enabled
:
root
.
visible
&&
contentLayout
.
complete
SequentialAnimation
{
NumberAnimation
{
duration
:
Kirigami
.
Units
.
shortDuration
*
2
}
PropertyAction
{
targets
:
root
;
property
:
"
_animating
"
;
value
:
false
}
}
}
rowSpacing
:
Kirigami
.
Units
.
largeSpacing
columnSpacing
:
Kirigami
.
Units
.
smallSpacing
Kirigami.Icon
{
id
:
icon
width
:
Kirigami
.
Units
.
iconSizes
.
smallMedium
height
:
width
Layout.alignment
:
text
.
lineCount
>
1
?
Qt
.
AlignTop
:
Qt
.
AlignVCenter
Layout.minimumWidth
:
width
Layout.minimumHeight
:
height
source
:
{
if
(
root
.
icon
.
source
)
{
return
root
.
icon
.
source
;
}
if
(
root
.
type
==
Kirigami
.
MessageType
.
Positive
)
{
return
"
dialog-positive
"
;
}
else
if
(
root
.
type
==
Kirigami
.
MessageType
.
Warning
)
{
return
"
dialog-warning
"
;
}
else
if
(
root
.
type
==
Kirigami
.
MessageType
.
Error
)
{
return
"
dialog-error
"
;
}
return
"
dialog-information
"
;
}
color
:
root
.
icon
.
color
}
MouseArea
{
implicitHeight
:
text
.
implicitHeight
Layout.fillWidth
:
true
Layout.alignment
:
text
.
lineCount
>
1
?
Qt
.
AlignTop
:
Qt
.
AlignVCenter
Layout.row
:
0
Layout.column
:
1
cursorShape
:
text
.
hoveredLink
?
Qt
.
PointingHandCursor
:
Qt
.
ArrowCursor
Controls.Label
{
id
:
text
width
:
parent
.
width
color
:
Kirigami
.
Theme
.
textColor
wrapMode
:
Text
.
WordWrap
elide
:
Text
.
ElideRight
text
:
root
.
text
onLinkHovered
:
root
.
linkHovered
(
link
)
onLinkActivated
:
root
.
linkActivated
(
link
)
}
//this must be child of an item which doesn't try to resize it
TextMetrics
{
id
:
messageTextMetrics
font
:
text
.
font
text
:
text
.
text
}
}
Kirigami.ActionToolBar
{
id
:
actionsLayout
flat
:
false
actions
:
root
.
actions
visible
:
root
.
actions
.
length
Layout.alignment
:
Qt
.
AlignRight
Layout.row
:
{
if
(
messageTextMetrics
.
width
+
Kirigami
.
Units
.
smallSpacing
>
(
contentLayout
.
width
-
icon
.
width
-
actionsLayout
.
width
-
closeButton
.
width
-
(
3
*
contentLayout
.
columnSpacing
)))
{
return
1
;
}
return
0
;
}
Layout
.
column
:
Layout
.
row
?
0
:
2
Layout
.
columnSpan
:
Layout
.
row
?
(
closeButton
.
visible
?
3
:
2
)
:
1
}
Controls.ToolButton
{
id
:
closeButton
visible
:
root
.
showCloseButton
Layout.alignment
:
text
.
lineCount
>
1
||
actionsLayout
.
Layout
.
row
?
Qt
.
AlignTop
:
Qt
.
AlignVCenter
Layout.row
:
0
Layout.column
:
actionsLayout
.
Layout
.
row
?
2
:
3
//TODO: use toolbuttons icons when we can depend from Qt 5.10
Kirigami.Icon
{
anchors.centerIn
:
parent
source
:
"
dialog-close
"
width
:
Kirigami
.
Units
.
iconSizes
.
smallMedium
height
:
width
}
onClicked
:
root
.
visible
=
false
}
Component
.
onCompleted
:
complete
=
true
}
}
src/qml/elements/kirigami/templates/private/IconPropertiesGroup.qml
0 → 100644
View file @
ede2b766
/*
* Copyright 2017 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import
QtQml
2.1
//this is a subset of those used in QQC2, Kirigami.Action still needs the full one as needs 100% api compatibility
QtObject
{
property
var
source
property
color
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
src/qml/settings/ChangePassword.qml
View file @
ede2b766
...
...
@@ -29,11 +29,13 @@
*/
import
QtQuick
2.7
import
QtQuick
.
Controls
2.
3
as
Controls
import
QtQuick
.
Controls
2.
2
as
Controls
import
QtQuick
.
Layouts
1.3
import
org
.
kde
.
kirigami
2.
4
as
Kirigami
import
org
.
kde
.
kirigami
2.
3
as
Kirigami
import
im
.
kaidan
.
kaidan
1.0
import
"
../elements/kirigami
"
as
KirigamiStaging
// TODO switch back to Kirigami once all supported platforms support a recent enough version
Kirigami.Page
{
topPadding
:
0
...
...
@@ -78,16 +80,16 @@ Kirigami.Page {
}
}
Kirigami.InlineMessage
{
type
:
Kirigami
.
MessageType
.
Warning
KirigamiStaging.InlineMessage
{
visible
:
password1
.
text
!==
password2
.
text
type
:
Kirigami
.
MessageType
.
Warning
text
:
qsTr
(
"
New passwords do not match.
"
)
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
showCloseButton
:
true
}
Kirigami.InlineMessage
{
Kirigami
Staging
.InlineMessage
{
id
:
currentPasswordInvalidMessage
visible
:
false
type
:
Kirigami
.
MessageType
.
Warning
...
...
@@ -97,7 +99,7 @@ Kirigami.Page {
showCloseButton
:
true
}
Kirigami.InlineMessage
{
Kirigami
Staging
.InlineMessage
{
visible
:
kaidan
.
connectionState
!==
Enums
.
StateConnected
type
:
Kirigami
.
MessageType
.
Error
text
:
qsTr
(
"
You need to be connected to change your password.
"
)
...
...
src/qml/settings/SettingsPage.qml
View file @
ede2b766
...
...
@@ -29,7 +29,7 @@
*/
import
QtQuick
2.7
import
QtQuick
.
Controls
2.
3
as
Controls
import
QtQuick
.
Controls
2.
2
as
Controls
import
QtQuick
.
Layouts
1.3
import
org
.
kde
.
kirigami
2.3
as
Kirigami
import
im
.
kaidan
.
kaidan
1.0
...
...
utils/build-linux-click.sh
View file @
ede2b766
...
...
@@ -22,6 +22,7 @@ build_kaidan() {
-DCMAKE_PREFIX_PATH
=
"
${
CLICK_TARGET_DIR
}
"
\
-DCMAKE_INSTALL_PREFIX
=
"
${
CLICK_TARGET_DIR
}
"
\
-DCMAKE_CXX_FLAGS
=
-isystem
\
${
CLICK_TARGET_DIR
}
/include/qxmpp
\
-DCMAKE_EXE_LINKER_FLAGS
=
"
$LDFLAGS
"
\
-DI18N
=
1
\
-DUBUNTU_TOUCH
=
1
\
-DCLICK_ARCH
=
"
${
ARCH
}
"
\
...
...
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