mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
RTL: AboutPopUp fix
Fixed the alignment problem with RTL languages on the About Jami PopUp. GitLab: #1952 Change-Id: I8262cb658ac3099a113e04574df3e93bd7993f0b
This commit is contained in:
parent
81112ff1f8
commit
7f0a94dd48
1 changed files with 179 additions and 175 deletions
|
@ -32,219 +32,223 @@ BaseModalDialog {
|
||||||
button1.text: JamiStrings.contribute
|
button1.text: JamiStrings.contribute
|
||||||
button2.text: JamiStrings.feedback
|
button2.text: JamiStrings.feedback
|
||||||
|
|
||||||
button1.onClicked: { Qt.openUrlExternally("https://jami.net/contribute/")}
|
button1.onClicked: {
|
||||||
button2.onClicked: { Qt.openUrlExternally("mailto:jami@gnu.org")}
|
Qt.openUrlExternally("https://jami.net/contribute/");
|
||||||
|
}
|
||||||
|
button2.onClicked: {
|
||||||
|
Qt.openUrlExternally("mailto:jami@gnu.org");
|
||||||
|
}
|
||||||
|
|
||||||
popupContent: JamiFlickable {
|
popupContent: JamiFlickable {
|
||||||
id: aboutPopUpScrollView
|
id: aboutPopUpScrollView
|
||||||
|
|
||||||
width: aboutPopUpContentRectColumnLayout.implicitWidth
|
width: aboutPopUpContentRectColumnLayout.implicitWidth
|
||||||
height: Math.min(root.implicitHeight, aboutPopUpContentRectColumnLayout.implicitHeight)
|
height: Math.min(root.implicitHeight, aboutPopUpContentRectColumnLayout.implicitHeight)
|
||||||
|
|
||||||
contentHeight: aboutPopUpContentRectColumnLayout.implicitHeight
|
contentHeight: aboutPopUpContentRectColumnLayout.implicitHeight
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: aboutPopUpContentRectColumnLayout
|
id: aboutPopUpContentRectColumnLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
ResponsiveImage {
|
||||||
|
id: aboutPopUPJamiLogoImage
|
||||||
|
|
||||||
RowLayout{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
spacing: 10
|
Layout.margins: 10
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
|
||||||
ResponsiveImage {
|
source: JamiTheme.darkTheme ? JamiResources.logo_jami_standard_coul_white_svg : JamiResources.logo_jami_standard_coul_svg
|
||||||
id: aboutPopUPJamiLogoImage
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
|
||||||
Layout.margins: 10
|
|
||||||
Layout.preferredWidth: 150
|
|
||||||
Layout.preferredHeight: 50
|
|
||||||
|
|
||||||
source: JamiTheme.darkTheme ? JamiResources.logo_jami_standard_coul_white_svg : JamiResources.logo_jami_standard_coul_svg
|
|
||||||
}
|
|
||||||
|
|
||||||
Control {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
color: JamiTheme.backgroundRectangleColor
|
|
||||||
radius: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
padding: 10
|
|
||||||
contentItem: ColumnLayout {
|
|
||||||
spacing: 4
|
|
||||||
TextEdit {
|
|
||||||
id: jamiSlogansText
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pixelSize: JamiTheme.menuFontSize
|
|
||||||
font.bold: true
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: textMetricsjamiSlogansText.text
|
|
||||||
selectByMouse: true
|
|
||||||
readOnly: true
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiSlogansText
|
|
||||||
font: jamiSlogansText.font
|
|
||||||
text: JamiStrings.slogan
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TextEdit {
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
|
|
||||||
font.pixelSize: JamiTheme.textFontSize
|
|
||||||
padding: 0
|
|
||||||
readonly property bool isBeta: AppVersionManager.isCurrentVersionBeta()
|
|
||||||
text: {
|
|
||||||
// HACK: Only display the version string if it has been constructed properly.
|
|
||||||
// This is a workaround for an issue that occurs due to the way Linux
|
|
||||||
// packaging is done, where the git repository is not available in the
|
|
||||||
// build source at configure time, which is when the version files are
|
|
||||||
// generated, so we prevent a "." from being displayed if the version
|
|
||||||
// string is not available.
|
|
||||||
var contentStr = JamiStrings.buildID + ": " + UtilsAdapter.getBuildIDStr();
|
|
||||||
const versionStr = UtilsAdapter.getVersionStr()
|
|
||||||
if (versionStr.length > 1) {
|
|
||||||
contentStr += "\n" + JamiStrings.version + ": " + (isBeta ? "(Beta) " : "") + versionStr
|
|
||||||
}
|
|
||||||
return contentStr
|
|
||||||
}
|
|
||||||
|
|
||||||
selectByMouse: true
|
|
||||||
readOnly: true
|
|
||||||
|
|
||||||
color: JamiTheme.faddedFontColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
Control {
|
||||||
id: jamiDeclarationHyperText
|
Layout.fillHeight: true
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
// Strangely, hoveredLink works badly when width grows too large
|
background: Rectangle {
|
||||||
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2*JamiTheme.preferredMarginSize
|
color: JamiTheme.backgroundRectangleColor
|
||||||
Layout.topMargin: 15
|
radius: 5
|
||||||
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
|
|
||||||
font.pixelSize: JamiTheme.menuFontSize
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: textMetricsjamiDeclarationHyperText.text
|
|
||||||
textFormat: TextEdit.RichText
|
|
||||||
wrapMode: TextEdit.WordWrap
|
|
||||||
selectByMouse: true
|
|
||||||
readOnly: true
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
|
||||||
|
|
||||||
TextMetrics {
|
|
||||||
id: textMetricsjamiDeclarationHyperText
|
|
||||||
font: jamiDeclarationHyperText.font
|
|
||||||
text: JamiStrings.declaration
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
padding: 10
|
||||||
anchors.fill: parent
|
contentItem: ColumnLayout {
|
||||||
|
spacing: 4
|
||||||
|
TextEdit {
|
||||||
|
id: jamiSlogansText
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
|
||||||
// We don't want to eat clicks on the Text.
|
wrapMode: Text.WordWrap
|
||||||
acceptedButtons: Qt.NoButton
|
font.pixelSize: JamiTheme.menuFontSize
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
font.bold: true
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: textMetricsjamiSlogansText.text
|
||||||
|
selectByMouse: true
|
||||||
|
readOnly: true
|
||||||
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiSlogansText
|
||||||
|
font: jamiSlogansText.font
|
||||||
|
text: JamiStrings.slogan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TextEdit {
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
|
||||||
|
font.pixelSize: JamiTheme.textFontSize
|
||||||
|
padding: 0
|
||||||
|
readonly property bool isBeta: AppVersionManager.isCurrentVersionBeta()
|
||||||
|
text: {
|
||||||
|
// HACK: Only display the version string if it has been constructed properly.
|
||||||
|
// This is a workaround for an issue that occurs due to the way Linux
|
||||||
|
// packaging is done, where the git repository is not available in the
|
||||||
|
// build source at configure time, which is when the version files are
|
||||||
|
// generated, so we prevent a "." from being displayed if the version
|
||||||
|
// string is not available.
|
||||||
|
var contentStr = JamiStrings.buildID + ": " + UtilsAdapter.getBuildIDStr();
|
||||||
|
const versionStr = UtilsAdapter.getVersionStr();
|
||||||
|
if (versionStr.length > 1) {
|
||||||
|
contentStr += "\n" + JamiStrings.version + ": " + (isBeta ? "(Beta) " : "") + versionStr;
|
||||||
|
}
|
||||||
|
return contentStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectByMouse: true
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
color: JamiTheme.faddedFontColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
id: jamiNoneWarrantyHyperText
|
id: jamiDeclarationHyperText
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2*JamiTheme.preferredMarginSize
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 15
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pixelSize: JamiTheme.menuFontSize
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignTop
|
// Strangely, hoveredLink works badly when width grows too large
|
||||||
color: JamiTheme.textColor
|
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2 * JamiTheme.preferredMarginSize
|
||||||
|
Layout.topMargin: 15
|
||||||
|
|
||||||
text: textMetricsjamiNoneWarrantyHyperText.text
|
color: JamiTheme.textColor
|
||||||
textFormat: TextEdit.RichText
|
|
||||||
selectByMouse: true
|
|
||||||
readOnly: true
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
|
||||||
|
|
||||||
TextMetrics {
|
font.pixelSize: JamiTheme.menuFontSize
|
||||||
id: textMetricsjamiNoneWarrantyHyperText
|
verticalAlignment: Text.AlignVCenter
|
||||||
font: jamiDeclarationHyperText.font
|
|
||||||
text: JamiStrings.noWarranty
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
text: textMetricsjamiDeclarationHyperText.text
|
||||||
anchors.fill: parent
|
textFormat: TextEdit.RichText
|
||||||
acceptedButtons: Qt.NoButton
|
wrapMode: TextEdit.WordWrap
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
selectByMouse: true
|
||||||
}
|
readOnly: true
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsjamiDeclarationHyperText
|
||||||
|
font: jamiDeclarationHyperText.font
|
||||||
|
text: JamiStrings.declaration
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
MouseArea {
|
||||||
id: jamiYears
|
anchors.fill: parent
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignLeft
|
// We don't want to eat clicks on the Text.
|
||||||
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2*JamiTheme.preferredMarginSize
|
acceptedButtons: Qt.NoButton
|
||||||
Layout.topMargin: 15
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
TextEdit {
|
||||||
font.pixelSize: JamiTheme.menuFontSize
|
id: jamiNoneWarrantyHyperText
|
||||||
verticalAlignment: Text.AlignTop
|
|
||||||
|
|
||||||
color: JamiTheme.textColor
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2 * JamiTheme.preferredMarginSize
|
||||||
|
Layout.topMargin: 15
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pixelSize: JamiTheme.menuFontSize
|
||||||
|
|
||||||
text: textMetricsYears.text
|
verticalAlignment: Text.AlignTop
|
||||||
textFormat: TextEdit.RichText
|
color: JamiTheme.textColor
|
||||||
selectByMouse: true
|
|
||||||
readOnly: true
|
|
||||||
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
text: textMetricsjamiNoneWarrantyHyperText.text
|
||||||
|
textFormat: TextEdit.RichText
|
||||||
|
selectByMouse: true
|
||||||
|
readOnly: true
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: textMetricsYears
|
id: textMetricsjamiNoneWarrantyHyperText
|
||||||
font: jamiDeclarationHyperText.font
|
font: jamiDeclarationHyperText.font
|
||||||
text: JamiStrings.declarationYear + " " + '<a href="https://savoirfairelinux.com/" style="color: ' + JamiTheme.buttonTintedBlue + '">Savoir-faire Linux Inc.</a><br>'
|
text: JamiStrings.noWarranty
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.NoButton
|
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
MouseArea {
|
||||||
width: projectCreditsScrollView.width + 20
|
anchors.fill: parent
|
||||||
height: projectCreditsScrollView.height + 20
|
acceptedButtons: Qt.NoButton
|
||||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
color: JamiTheme.backgroundRectangleColor
|
TextEdit {
|
||||||
radius: 5
|
id: jamiYears
|
||||||
|
|
||||||
ProjectCreditsScrollView {
|
Layout.alignment: Qt.AlignLeft
|
||||||
id: projectCreditsScrollView
|
Layout.maximumWidth: JamiTheme.preferredDialogWidth - 2 * JamiTheme.preferredMarginSize
|
||||||
|
Layout.topMargin: 15
|
||||||
|
|
||||||
anchors.centerIn: parent
|
wrapMode: Text.WordWrap
|
||||||
width: JamiTheme.preferredDialogWidth - 2*JamiTheme.preferredMarginSize
|
font.pixelSize: JamiTheme.menuFontSize
|
||||||
height: 140
|
verticalAlignment: Text.AlignTop
|
||||||
anchors.margins: 10
|
|
||||||
}
|
color: JamiTheme.textColor
|
||||||
|
|
||||||
|
text: textMetricsYears.text
|
||||||
|
textFormat: TextEdit.RichText
|
||||||
|
selectByMouse: true
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetricsYears
|
||||||
|
font: jamiDeclarationHyperText.font
|
||||||
|
text: JamiStrings.declarationYear + " " + '<a href="https://savoirfairelinux.com/" style="color: ' + JamiTheme.buttonTintedBlue + '">Savoir-faire Linux Inc.</a><br>'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
|
||||||
|
width: JamiTheme.preferredDialogWidth - 2 * JamiTheme.preferredMarginSize
|
||||||
|
height: 160
|
||||||
|
|
||||||
|
color: JamiTheme.backgroundRectangleColor
|
||||||
|
radius: 5
|
||||||
|
|
||||||
|
ProjectCreditsScrollView {
|
||||||
|
id: projectCreditsScrollView
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.topMargin: JamiTheme.preferredMarginSize
|
||||||
|
anchors.bottomMargin: JamiTheme.preferredMarginSize
|
||||||
|
anchors.leftMargin: JamiTheme.preferredMarginSize / 2
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue