[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:17:56 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=e0092cb
The following commit has been merged in the master branch:
commit e0092cb6f885268c223b8a2634b91ced757d4066
Author: Aleix Pol <aleixpol at kde.org>
Date: Fri Feb 8 00:53:02 2013 +0100
General fix&clean in contact list
Fix filtering in the view
Remove unneeded ;
Better use of the PlasmaComponents
REVIEW: 108831
---
.../contents/ui/ContactList.qml | 55 +++---------
.../contents/ui/ListContactDelegate.qml | 99 ++++++++--------------
2 files changed, 46 insertions(+), 108 deletions(-)
diff --git a/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml b/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
index 2f0ea05..f7dafd1 100644
--- a/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
+++ b/contactlist/org.kde.ktp-contactlist/contents/ui/ContactList.qml
@@ -24,55 +24,29 @@ import org.kde.plasma.core 0.1 as PlasmaCore
Item {
- id: contactListContainer;
- anchors.fill: parent;
+ id: contactListContainer
+ anchors.fill: parent
KTp.ContactList {
- id: contactList
- }
-
- Component {
- id: highlightBar
- PlasmaCore.FrameSvgItem {
- imagePath: "widgets/viewitem"
- prefix: "hover"
- width: contactsList.width
- opacity: 0
- Behavior on opacity {
- NumberAnimation {
- duration: 250
- easing.type: Easing.OutQuad
- }
- }
- }
+ id: contactList
}
ListView {
- id: contactsList;
+ id: contactsList
anchors {
- top: parent.top;
- topMargin: 5;
- left: parent.left;
- right: viewScrollBar.left;
- rightMargin: 1
- bottom: parent.bottom;
+ top: parent.top
+ left: parent.left
+ right: viewScrollBar.left
+ bottom: parent.bottom
}
- clip: true;
- model: contactList.model;
+ clip: true
+ model: contactList.model
boundsBehavior: Flickable.StopAtBounds
delegate: ListContactDelegate {}
- highlight: highlightBar
- highlightMoveDuration: 250
- highlightMoveSpeed: 1
- highlightFollowsCurrentItem: true
-
focus: true
-
-
-
}
PlasmaComponents.ScrollBar {
@@ -84,14 +58,11 @@ Item {
}
flickableItem: contactsList
- interactive: true
- opacity: 1
orientation: Qt.Vertical
}
- Component.onCompleted : {
- contactList.model.sortMode = KTp.AccountsFilterModel.SortByPresence;
- contactList.model.presenceTypeFilterFlags = KTp.AccountsFilterModel.HideAllOffline
+ Component.onCompleted: {
+ contactList.model.presenceTypeFilterFlags = KTp.AccountsFilterModel.HideAllOffline
+ contactList.model.sortMode = KTp.AccountsFilterModel.SortByPresence
}
-
}
diff --git a/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml b/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
index 9bf73d8..164fdfc 100644
--- a/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
+++ b/contactlist/org.kde.ktp-contactlist/contents/ui/ListContactDelegate.qml
@@ -22,83 +22,50 @@ import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.components 0.1 as PlasmaComponents
import org.kde.qtextracomponents 0.1 as ExtraComponents
-Item {
- id: delegate;
+PlasmaComponents.ListItem {
+ id: delegate
enabled: true
- height: 36;
+ height: Math.ceil(nickLabel.height*1.5)
width: parent.width
+
+ onClicked: contactList.startChat(model.account, model.contact)
- PlasmaCore.FrameSvgItem {
- id: padding
- imagePath: "widgets/viewitem"
- prefix: "hover"
- opacity: 0
- anchors.fill: parent
- }
-
- Item {
- anchors.fill: parent
- anchors.topMargin: padding.margins.top
- anchors.bottomMargin: padding.margins.bottom
- anchors.leftMargin: padding.margins.left
- anchors.rightMargin: padding.margins.right
-
-
- ExtraComponents.QIconItem {
- id: avatarLabel;
- width: 30;
- height: parent.height;
-
- icon : (model.avatar ? model.avatar : "im-user")
- anchors {
- left: parent.left;
- verticalCenter: parent.verticalCenter;
- }
- }
+ ExtraComponents.QIconItem {
+ id: avatarLabel
+ width: height
+ height: parent.height
- PlasmaComponents.Label {
- id: nickLabel;
- text: model.display;
- font.bold: true
- elide: Text.ElideRight
-
- anchors {
- left: avatarLabel.right;
- right: presenceLabel.left
- leftMargin: 4;
- verticalCenter: parent.verticalCenter;
- }
- }
-
- ExtraComponents.QIconItem {
- id: presenceLabel
- width: 22
- height: parent.height
- icon: presenceIcon
- anchors {
- right:parent.right
- leftMargin: 4
- verticalCenter: parent.verticalCenter
- }
+ icon: (model.avatar ? model.avatar : "im-user")
+ anchors {
+ left: parent.left
+ verticalCenter: parent.verticalCenter
}
}
- MouseArea {
- anchors.fill: parent
+ PlasmaComponents.Label {
+ id: nickLabel
+ text: model.display
+ font.bold: true
+ elide: Text.ElideRight
- hoverEnabled: true
-
- onDoubleClicked: {
- contactList.startChat(model.account, model.contact);
+ anchors {
+ left: avatarLabel.right
+ right: presenceLabel.left
+ leftMargin: 4
+ verticalCenter: parent.verticalCenter
}
+ }
- onEntered: {
- contactsList.currentIndex = index;
- contactsList.highlightItem.opacity = 1;
- }
- onExited: {
- contactsList.highlightItem.opacity = 0;
+ ExtraComponents.QIconItem {
+ id: presenceLabel
+ width: height
+ height: parent.height
+ icon: presenceIcon
+ anchors {
+ right:parent.right
+ leftMargin: 4
+ verticalCenter: parent.verticalCenter
}
}
}
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list