Compare commits

..
Author SHA1 Message Date
Anthony Laibe 9ad682b95f fix(@general): fix linux build
fixes #413
2022-03-03 10:45:03 +01:00
Anthony Laibe f574e39012 fix(@StatusListItem): fix left padding
When there is an icon, take it into account when calculating the left
padding
2022-03-02 19:01:12 +01:00
Jonathan Rainville 8495fae8a5 fix(StatusListItem): add propagateTitleClicks property to StatusListItem
Makes it possible disable the propagation of the mouse event when it's not wanted, for example in the search popup, where if the user clicks the title, we want to show the profile popup, but not navigate to the channel
2022-02-23 09:49:59 +01:00
Alexandra Betouni 07a5dc09ac fix(StatusTagSelector): Updates and fixes in the component
Moved `remove` function below remove contact signal
also removed online status badge from CreateChatView

Fixed as well name tags to be adapting on parent's
width and scrolling the list to the end when this is
bigger than the available width. Switcehd to use
nameCountLimit property where needed
2022-02-22 11:27:35 +01:00
4 changed files with 22 additions and 8 deletions
+9 -3
View File
@@ -1,4 +1,10 @@
make clean
qmake sandbox.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
make
#!/bin/bash
make clean
if [[ $OSTYPE == 'darwin'* ]]
then
qmake sandbox.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
else
qmake sandbox.pro CONFIG+=debug CONFIG+=x86_64 && /usr/bin/make qmake_all
fi
make
+3 -2
View File
@@ -20,6 +20,7 @@ Rectangle {
property real rightPadding: 16
property bool enabled: true
property bool highlighted: false
property bool propagateTitleClicks: true
property int type: StatusListItem.Type.Primary
property list<Item> components
@@ -144,7 +145,7 @@ Rectangle {
anchors.left: iconOrImage.active ? iconOrImage.right : parent.left
anchors.right: statusListItemLabel.visible ? statusListItemLabel.left : statusListItemComponentsSlot.left
anchors.leftMargin: statusListItem.leftPadding
anchors.leftMargin: iconOrImage.active ? 16 : statusListItem.leftPadding
anchors.rightMargin: statusListItem.rightPadding
anchors.verticalCenter: parent.verticalCenter
height: childrenRect.height
@@ -175,7 +176,7 @@ Rectangle {
anchors.fill: parent
cursorShape: containsMouse? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
propagateComposedEvents: true
propagateComposedEvents: statusListItem.propagateTitleClicks
onClicked: {
statusListItem.titleClicked(statusListItem.titleId)
mouse.accepted = false
@@ -10,6 +10,7 @@ StatusPopupMenu {
property var searchPopup
property var locationModel
readonly property int numDefaultItems: 2
signal itemClicked(string firstLevelItemValue, string secondLevelItemValue)
@@ -43,7 +44,7 @@ StatusPopupMenu {
color: model.iconColor,
isLetterIdenticon: !model.imageSource && !model.iconName
});
root.insertMenu(index+2, item);
root.insertMenu(index + numDefaultItems, item);
} else {
item.value = model.value
item.text = model.title;
@@ -52,7 +53,7 @@ StatusPopupMenu {
item.iconSettings.isLetterIdenticon = !model.imageSource && !model.iconName
item.image.source = model.imageSource;
item.image.isIdenticon = model.isIdenticon;
root.insertItem(index+2, item);
root.insertItem(index + numDefaultItems, item);
}
}
}
+7 -1
View File
@@ -24,6 +24,9 @@ StatusModal {
property Menu searchOptionsPopupMenu: Menu { }
property var searchResults: [ ]
property var searchSelectionButton
// This function is called to know if the popup accepts clicks in the title
// If it does not, the clicks on the titles mousearea will be propagated to the main body instead
property var acceptsTitleClick: function(titleId) {return true}
signal resultItemClicked(string itemId)
signal resultItemTitleClicked(string titleId)
@@ -275,8 +278,11 @@ StatusModal {
root.resultItemClicked(itemId)
}
propagateTitleClicks: !root.acceptsTitleClick(titleId)
onTitleClicked: {
root.resultItemTitleClicked(titleId)
if (root.acceptsTitleClick(titleId)) {
root.resultItemTitleClicked(titleId)
}
}
}
section.property: "sectionName"