<file>src/gui/tray/EditFileLocallyLoadingDialog.qml</file>
<file>src/gui/tray/NCBusyIndicator.qml</file>
<file>src/gui/tray/NCToolTip.qml</file>
+ <file>src/gui/tray/EnforcedPlainTextLabel.qml</file>
<file>theme/Style/Style.qml</file>
<file>theme/Style/qmldir</file>
</qresource>
import QtGraphicalEffects 1.0
import Style 1.0
+import "./tray"
ComboBox {
id: clearComboBox
opacity: clearComboBox.hovered ? Style.hoverOpacity : 1.0
}
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
leftPadding: 0
rightPadding: clearComboBox.indicator.width + clearComboBox.spacing
delegate: ItemDelegate {
id: clearStatusDelegate
width: clearComboBox.width
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
text: modelData.display
textFormat: Text.PlainText
color: Style.ncTextColor
import Style 1.0
import com.nextcloud.desktopclient 1.0 as NC
+import "./tray"
ColumnLayout {
NC.EmojiModel {
radius: Style.slightlyRoundedButtonRadius
}
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: emoji
radius: Style.slightlyRoundedButtonRadius
}
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: modelData === undefined ? "" : modelData.unicode
}
}
- Label {
+ EnforcedPlainTextLabel {
id: placeholderMessage
width: parent.width * 0.8
anchors.centerIn: parent
import QtQuick.Controls 2.15
import Style 1.0
+import "./tray"
Item {
id: errorBox
columns: 2
- Label {
+ EnforcedPlainTextLabel {
Layout.fillWidth: true
color: Style.ncTextColor
font.bold: true
onClicked: errorBox.closeButtonClicked()
}
- Label {
+ EnforcedPlainTextLabel {
id: errorMessage
Layout.fillWidth: true
import QtQuick.Controls 2.15
import Style 1.0
+import "./tray"
AbstractButton {
id: root
contentItem: Row {
spacing: root.internalSpacing
- Label {
+ EnforcedPlainTextLabel {
width: root.emojiWidth > 0 ? root.emojiWidth : implicitWidth
text: emoji
textFormat: Text.PlainText
Row {
spacing: Style.smallSpacing
- Label {
+ EnforcedPlainTextLabel {
text: root.statusText
textFormat: Text.PlainText
color: Style.ncTextColor
font.bold: true
}
- Label {
+ EnforcedPlainTextLabel {
text: "-"
color: Style.ncTextColor
verticalAlignment: Text.AlignVCenter
}
- Label {
+ EnforcedPlainTextLabel {
text: root.clearAtText
textFormat: Text.PlainText
color: Style.ncTextColor
import com.nextcloud.desktopclient 1.0 as NC
import Style 1.0
+import "./tray"
ColumnLayout {
id: rootLayout
Layout.fillWidth: true
spacing: Style.smallSpacing
- Label {
+ EnforcedPlainTextLabel {
Layout.fillWidth: true
Layout.bottomMargin: Style.smallSpacing
horizontalAlignment: Text.AlignHCenter
Layout.fillHeight: true
spacing: Style.smallSpacing
- Label {
+ EnforcedPlainTextLabel {
Layout.fillWidth: true
Layout.bottomMargin: Style.smallSpacing
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
spacing: Style.smallSpacing
- Label {
+ EnforcedPlainTextLabel {
id: clearComboLabel
Layout.fillWidth: true
import Style 1.0
+import "./tray"
+
AbstractButton {
id: root
visible: root.icon.source !== ""
}
- Label {
+ EnforcedPlainTextLabel {
Layout.column: root.icon.source === "" ? 0 : 1
Layout.columnSpan: root.icon.source === "" ? 2 : 1
Layout.row: 0
font.bold: root.primary
}
- Label {
+ EnforcedPlainTextLabel {
Layout.column: root.icon.source === "" ? 0 : 1
Layout.columnSpan: root.icon.source === "" ? 2 : 1
Layout.row: 1
import com.nextcloud.desktopclient 1.0
import Style 1.0
+import "../tray"
Page {
id: root
fillMode: Image.PreserveAspectFit
}
- Label {
+ EnforcedPlainTextLabel {
id: fileNameLabel
Layout.fillWidth: true
wrapMode: Text.Wrap
}
- Label {
+ EnforcedPlainTextLabel {
id: fileDetailsLabel
Layout.fillWidth: true
wrapMode: Text.Wrap
}
- Label {
+ EnforcedPlainTextLabel {
id: fileLockedLabel
Layout.fillWidth: true
import com.nextcloud.desktopclient 1.0
import Style 1.0
+import "../tray"
TabButton {
id: tabButton
}
}
- Label {
+ EnforcedPlainTextLabel {
id: tabButtonLabel
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
}
}
- Label {
+ EnforcedPlainTextLabel {
id: shareTypeLabel
Layout.fillWidth: true
elide: Text.ElideRight
}
- Label {
+ EnforcedPlainTextLabel {
id: linkDetailLabel
Layout.fillWidth: true
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
- Label {
+ EnforcedPlainTextLabel {
id: sharingDisabledLabel
width: parent.width
text: qsTr("Sharing is disabled")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- Label {
+ EnforcedPlainTextLabel {
width: parent.width
text: qsTr("This item cannot be shared.")
color: Style.ncSecondaryTextColor
verticalAlignment: Text.AlignVCenter
visible: !root.shareModel.canShare
}
- Label {
+ EnforcedPlainTextLabel {
width: parent.width
text: qsTr("Sharing is disabled.")
color: Style.ncSecondaryTextColor
text: root.toolTipText
delay: Qt.styleHints.mousePressAndHoldInterval
visible: root.toolTipText !== "" && root.hovered
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
text: customTextButtonTooltip.text
color: Style.ncTextColor
}
spacing: Style.activityContentSpace
- Label {
+ EnforcedPlainTextLabel {
id: activityTextTitle
text: (root.activityData.type === "Activity" || root.activityData.type === "Notification") ? root.activityData.subject : root.activityData.message
height: (text === "") ? 0 : implicitHeight
visible: text !== ""
}
- Label {
+ EnforcedPlainTextLabel {
id: activityTextInfo
text: (root.activityData.type === "Sync") ? root.activityData.displayPath
: (root.activityData.type === "File") ? root.activityData.subject
visible: text !== ""
}
- Label {
+ EnforcedPlainTextLabel {
id: activityTextDateTime
text: root.activityData.dateTime
height: (text === "") ? 0 : implicitHeight
visible: text !== ""
}
- Label {
+ EnforcedPlainTextLabel {
id: talkReplyMessageSent
text: root.activityData.messageSent
height: (text === "") ? 0 : implicitHeight
source: "image://svgimage-custom-color/activity.svg/" + Style.ncSecondaryTextColor
}
- Label {
+ EnforcedPlainTextLabel {
width: parent.width
text: qsTr("No activities yet")
color: Style.ncSecondaryTextColor
}
}
- Label {
+ EnforcedPlainTextLabel {
id: message
text: root.subject
textFormat: Text.PlainText
color: Style.ncTextColor
running: true
}
- Label {
+ EnforcedPlainTextLabel {
id: labelFileName
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
visible: root.fileName !== ""
}
- Label {
+ EnforcedPlainTextLabel {
id: labelMessage
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
--- /dev/null
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+Label {
+ function resetToPlainText() {
+ if (textFormat !== Text.PlainText) {
+ console.log("WARNING: this label was set to a non-plain text format. Resetting to plain text.")
+ textFormat = Text.PlainText;
+ }
+ }
+
+ textFormat: Text.PlainText
+ onTextFormatChanged: resetToPlainText()
+ Component.onCompleted: resetToPlainText()
+}
visible: root.hovered ? root.imageSourceHover !== "" : root.imageSource !== ""
}
- Label {
+ EnforcedPlainTextLabel {
id: buttonLabel
Layout.fillWidth: true
id: toolTip
clip: true
delay: Qt.styleHints.mousePressAndHoldInterval
- contentItem: Label {
+ contentItem: EnforcedPlainTextLabel {
text: toolTip.text
textFormat: Text.PlainText
color: Style.ncTextColor
Layout.fillWidth: true
Layout.fillHeight: true
- Text {
+ EnforcedPlainTextLabel {
id: syncProgressText
Layout.fillWidth: true
}
}
- Text {
+ EnforcedPlainTextLabel {
id: syncProgressDetailText
Layout.fillWidth: true
import Style 1.0
-Label {
+EnforcedPlainTextLabel {
property bool hovered: false
property color textColor: Style.ncTextColor
property color textColorHovered: Style.ncSecondaryTextColor
Accessible.name: unifiedSearchResultItemFetchMoreText.text
Accessible.onPressAction: unifiedSearchResultMouseArea.clicked()
- Label {
+ EnforcedPlainTextLabel {
id: unifiedSearchResultItemFetchMoreText
Layout.fillWidth: true
Layout.rightMargin: Style.trayHorizontalMargin
spacing: Style.standardSpacing
- Label {
+ EnforcedPlainTextLabel {
id: unifiedSearchResultTitleText
Layout.fillWidth: true
text: unifiedSearchResultItemDetails.title.replace(/[\r\n]+/g, " ")
font.pixelSize: unifiedSearchResultItemDetails.titleFontSize
color: unifiedSearchResultItemDetails.titleColor
}
- Label {
+ EnforcedPlainTextLabel {
id: unifiedSearchResultTextSubline
Layout.fillWidth: true
text: unifiedSearchResultItemDetails.subline.replace(/[\r\n]+/g, " ")
Layout.alignment: Qt.AlignHCenter
}
- Label {
+ EnforcedPlainTextLabel {
id: unifiedSearchResultsNoResultsLabel
text: qsTr("No results for")
color: Style.menuBorder
horizontalAlignment: Text.AlignHCenter
}
- Label {
+ EnforcedPlainTextLabel {
id: unifiedSearchResultsNoResultsLabelDetails
text: unifiedSearchResultNothingFoundContainer.text
textFormat: Text.PlainText
import Style 1.0
import com.nextcloud.desktopclient 1.0
-Label {
+EnforcedPlainTextLabel {
required property string section
topPadding: Style.unifiedSearchResultSectionItemVerticalPadding
Layout.fillWidth: true\r
Layout.fillHeight: true\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: accountUser\r
Layout.fillWidth: true\r
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
model.serverHasUserStatus &&\r
(model.statusEmoji !== "" || model.statusMessage !== "")\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: emoji\r
visible: model.statusEmoji !== ""\r
text: statusEmoji\r
topPadding: -Style.accountLabelsSpacing\r
}\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: message\r
Layout.fillWidth: true\r
visible: model.statusMessage !== ""\r
}\r
}\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: accountServer\r
Layout.fillWidth: true\r
Layout.alignment: Qt.AlignLeft | Qt.AlignTop\r
sourceSize.width: Style.headerButtonIconSize\r
sourceSize.height: Style.headerButtonIconSize\r
}\r
- Label {\r
+ EnforcedPlainTextLabel {\r
Layout.leftMargin: 14\r
text: qsTr("Add account")\r
color: Style.ncTextColor\r
Layout.fillWidth: true\r
Layout.maximumWidth: parent.width\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: currentAccountUser\r
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
width: Style.currentAccountLabelWidth\r
spacing: Style.accountLabelsSpacing\r
width: parent.width\r
\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: emoji\r
visible: UserModel.currentUser.statusEmoji !== ""\r
width: Style.userStatusEmojiSize\r
text: UserModel.currentUser.statusEmoji\r
textFormat: Text.PlainText\r
}\r
- Label {\r
+ EnforcedPlainTextLabel {\r
id: message\r
Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
Layout.fillWidth: true\r