Skip to content

Commit

Permalink
Updated MMTextBubble.qml
Browse files Browse the repository at this point in the history
  • Loading branch information
iiLubos committed Dec 11, 2023
1 parent 5f1e90b commit 562d698
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 43 deletions.
86 changes: 45 additions & 41 deletions app/qml/components/MMTextBubble.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,61 @@ import QtQuick.Layouts
Item {
id: root

height: 100
width: 300
height: row.height

required property var title
required property var description
required property string title
required property string description

Rectangle {
width: root.width
height: root.height
color: __style.whiteColor
radius: 15
width: root.width
height: row.height
color: __style.whiteColor
radius: __style.inputRadius
}

Row {
padding: 10
spacing: 10
anchors.fill: parent
id: row

Rectangle {
implicitWidth: radius * 2
implicitHeight: radius * 2
// x: control.leftPadding
y: parent.height / 2 - height / 2
radius: 20
color: __style.forestColor
padding: 20 * __dp
spacing: 10 * __dp

MMIcon {
id: icon
anchors.centerIn: parent
source: __style.bubbleIcon
}
}
Rectangle {
width: 50 * __dp
height: width
radius: height / 2
color: __style.forestColor

Column {
id: column
width: 2* root.width / 3
spacing: 10
Label {
text: root.title
font: __style.t1
color: __style.nightColor
wrapMode: Label.WordWrap
}
Image {
id: icon
anchors.centerIn: parent
source: __style.bubbleIcon
}
}

Column {
id: column

width: root.width - icon.width - 4 * row.spacing - 2 * row.padding
spacing: 10 * __dp

Text {
width: parent.width

text: root.title
font: __style.t3
color: __style.deepOceanColor
wrapMode: Label.WordWrap
}

Text {
width: column.width

Label {
text:root.description
font: __style.p5
color: __style.forestColor
wrapMode: Label.WordWrap
width: column.width
}
text: root.description
font: __style.p6
color: __style.deepOceanColor
wrapMode: Label.WordWrap
lineHeight: 1.5
}
}
}
}
5 changes: 3 additions & 2 deletions gallery/qml/pages/MiscPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ ScrollView {
spacing: 20
anchors.fill: parent
MMTextBubble {
title: "My text is great"
description: "My text is great. y text is great My text is great. y text is great. y text is great"
width: page.width - 64
title: "Tip from Mergin Maps"
description: "A good candidate for a workspace name is the name of your team or organisation"
}
}
}
Expand Down

1 comment on commit 562d698

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.12.495711 just submitted!

Please sign in to comment.