mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge branch 'qml_app_ui_aesthetic' into GSoC2017-evaluation-II
This commit is contained in:
commit
f77fe533e7
@ -3,13 +3,14 @@ import QtQuick.Layouts 1.2
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import "." // To load styles
|
import "." // To load styles
|
||||||
import "./components"
|
import "./components"
|
||||||
|
import "URI.js" as UriJs
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
|
||||||
id: chatBubbleDelegate
|
id: chatBubbleDelegate
|
||||||
height: bubble.height
|
height: bubble.height
|
||||||
width: parent.width
|
width: mainWindow.width - (styles.aditionalBubbleWidth - 10)
|
||||||
|
|
||||||
property var styles: StyleChat.bubble
|
property var styles: StyleChat.bubble
|
||||||
|
|
||||||
@ -80,7 +81,11 @@ Item
|
|||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
id: mesageText
|
id: mesageText
|
||||||
text: model.msg
|
text: UriJs.URI.withinString(model.msg, function(url)
|
||||||
|
{
|
||||||
|
return "<a href=\""+ url + "\">" + url + "</a>";
|
||||||
|
})
|
||||||
|
|
||||||
width: rootBubble.width * styles.bubbleMaxWidth + timeText.width
|
width: rootBubble.width * styles.bubbleMaxWidth + timeText.width
|
||||||
anchors.left: (model.incoming)? parent.left : undefined
|
anchors.left: (model.incoming)? parent.left : undefined
|
||||||
anchors.right:(!model.incoming)? parent.right : undefined
|
anchors.right:(!model.incoming)? parent.right : undefined
|
||||||
@ -89,6 +94,10 @@ Item
|
|||||||
anchors.leftMargin: styles.lMarginBubble
|
anchors.leftMargin: styles.lMarginBubble
|
||||||
anchors.rightMargin: styles.rMarginBubble
|
anchors.rightMargin: styles.rMarginBubble
|
||||||
|
|
||||||
|
|
||||||
|
textFormat: Text.RichText
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
// Used for the correct alineation when the message must be on right
|
// Used for the correct alineation when the message must be on right
|
||||||
horizontalAlignment:(!model.incoming &&
|
horizontalAlignment:(!model.incoming &&
|
||||||
mesageText.implicitWidth <= (rootBubble.width * styles.bubbleMaxWidth)
|
mesageText.implicitWidth <= (rootBubble.width * styles.bubbleMaxWidth)
|
||||||
@ -96,6 +105,7 @@ Item
|
|||||||
|
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
font.pixelSize: styles.messageTextSize
|
font.pixelSize: styles.messageTextSize
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,9 @@ Item
|
|||||||
source: cntDt.is_contact ?
|
source: cntDt.is_contact ?
|
||||||
"qrc:/icons/rating.svg" :
|
"qrc:/icons/rating.svg" :
|
||||||
"qrc:/icons/rating-unrated.svg"
|
"qrc:/icons/rating-unrated.svg"
|
||||||
height: parent.height - 4
|
height: parent.height -4
|
||||||
sourceSize.height: height
|
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
sourceSize.height: height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
|
Loading…
Reference in New Issue
Block a user