Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.14] Fix native UI #7117

Merged
merged 26 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7a61f79
Fix tray header light/dark theme.
camilasan Sep 11, 2024
19e5752
Fix caret-down icon theme, size and alignment.
camilasan Sep 11, 2024
418f624
Fix dark/light mode for account menu.
camilasan Sep 11, 2024
3d16c7e
Fix display of icons in dark/light theme.
camilasan Sep 12, 2024
8f2ef85
Add colored to base colors.
camilasan Sep 12, 2024
7d9d9aa
Use palette.window as header background color.
camilasan Sep 12, 2024
2de77e5
Add new icon for more apps menu.
camilasan Sep 12, 2024
40ccce3
Use Style.trayFolderStatusIndicatorRadiusFactor in the UserLine.
camilasan Sep 12, 2024
927ace3
Match the apps menu list look with the user's list look.
camilasan Sep 12, 2024
f97d28c
Use the same radius value, border colors and hover colors in all head…
camilasan Sep 12, 2024
0a88d3a
Add radius value, border and hover colors in the folder's menus.
camilasan Sep 12, 2024
45afe46
Add margin space to the right of the 3 dots user menu.
camilasan Sep 12, 2024
8131078
Fix the color of the tab icons in the files details page.
camilasan Sep 12, 2024
662e859
Fix warning: TypeError: Cannot read property 'height'/'width' of null.
camilasan Sep 12, 2024
c059c55
Fix unified search input placeholder text alignment and radius.
camilasan Sep 12, 2024
31e6e19
Fix height of text input fields and radius.
camilasan Sep 12, 2024
3fb2ee6
Remove extra ';'
camilasan Sep 13, 2024
6058997
Add the same round background rectangle for the talk reply text field.
camilasan Sep 13, 2024
759c28a
Adjust radius values: main window and text input uses bigger value, d…
camilasan Sep 13, 2024
c78c716
Fix emoji selector page: transparency made it unusable. Use windows b…
camilasan Sep 13, 2024
cccfe23
Add todo: fix predefined status list.
camilasan Sep 13, 2024
4edb6ab
Add todo: check if we should keep bottomUnifiedSearchInputSeparator.
camilasan Sep 13, 2024
6322c98
Remove user status hover effect and background color.
camilasan Sep 13, 2024
986ab83
Fix error: Audio is not a type.
camilasan Sep 13, 2024
25aab97
Fix wrong Style property.
camilasan Sep 13, 2024
f67582b
Remove extra ';'
camilasan Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ AbstractButton {

background: Rectangle {
color: root.hovered || root.checked ? palette.highlight : palette.base
radius: Style.slightlyRoundedButtonRadius
// TODO: fix radius borders - they were showing for each item
// radius: Style.slightlyRoundedButtonRadius
}

contentItem: Row {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/UserStatusSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ ColumnLayout {
anchors.centerIn: Overlay.overlay

background: Rectangle {
color: palette.toolTipBase
color: palette.window
border.width: Style.normalBorderWidth
border.color: palette.dark
radius: Style.slightlyRoundedButtonRadius
Expand Down
2 changes: 0 additions & 2 deletions src/gui/filedetails/FileDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ Page {
NCTabButton {
svgCustomColorSource: "image://svgimage-custom-color/activity.svg"
text: qsTr("Activity")
accentColor: root.accentColor
checked: swipeView.currentIndex === fileActivityView.swipeIndex
onClicked: swipeView.currentIndex = fileActivityView.swipeIndex
}
Expand All @@ -234,7 +233,6 @@ Page {
height: visible ? implicitHeight : 0
svgCustomColorSource: "image://svgimage-custom-color/share.svg"
text: qsTr("Sharing")
accentColor: root.accentColor
checked: swipeView.currentIndex === shareViewLoader.swipeIndex
onClicked: swipeView.currentIndex = shareViewLoader.swipeIndex
visible: root.fileDetails.sharingAvailable
Expand Down
4 changes: 2 additions & 2 deletions src/gui/filedetails/FileDetailsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ StackView {

initialItem: FileDetailsPage {
id: fileDetailsPage
width: parent.width
height: parent.height
width: root.width
height: root.height
backgroundsVisible: root.backgroundsVisible
rootStackView: root
onCloseButtonClicked: root.closeButtonClicked()
Expand Down
12 changes: 11 additions & 1 deletion src/gui/filedetails/NCInputTextEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Style
TextEdit {
id: root

readonly property color accentColor: Style.ncBlue
readonly property color accentColor: palette.highlight
readonly property color secondaryColor: palette.dark
readonly property alias submitButton: submitButton

Expand All @@ -33,6 +33,16 @@ TextEdit {
selectByMouse: true
height: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

Rectangle {
id: textFieldBorder
anchors.fill: parent
radius: Style.trayWindowRadius
border.width: Style.normalBorderWidth
border.color: root.activeFocus ? root.accentColor : root.secondaryColor
color: palette.window
z: -1
}

Button {
id: submitButton

Expand Down
9 changes: 8 additions & 1 deletion src/gui/filedetails/NCInputTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TextField {
readonly property alias submitButton: submitButton
property bool validInput: true

implicitHeight: Style.talkReplyTextFieldPreferredHeight
implicitHeight: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

rightPadding: submitButton.width

Expand All @@ -52,5 +52,12 @@ TextField {

onClicked: root.accepted()
}

verticalAlignment: Qt.AlignVCenter
background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}
}

5 changes: 2 additions & 3 deletions src/gui/filedetails/NCTabButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ TabButton {
id: tabButton

property string svgCustomColorSource: ""
property color accentColor: Style.ncBlue

padding: Style.smallSpacing
background: Rectangle {
Expand All @@ -36,7 +35,7 @@ TabButton {
contentItem: ColumnLayout {
id: tabButtonLayout

property var elementColors: tabButton.checked || tabButton.hovered ? palette.buttonText : palette.midlight
property var elementColors: tabButton.checked || tabButton.hovered ? palette.buttonText : palette.windowText

// We'd like to just set the height of the Image, but this causes crashing.
// So we use a wrapping Item and use anchors to adjust the size.
Expand Down Expand Up @@ -82,7 +81,7 @@ TabButton {
implicitWidth: textWidth + Style.standardSpacing * 2
implicitHeight: 2

color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : palette.base
color: tabButton.checked || tabButton.hovered ? palette.highlight : palette.base
}
}
}
8 changes: 8 additions & 0 deletions src/gui/filedetails/ShareeSearchField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ TextField {

placeholderText: enabled ? qsTr("Search for users or groups…") : qsTr("Sharing is not available for this folder")
placeholderTextColor: placeholderColor
verticalAlignment: Qt.AlignVCenter
implicitHeight: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}

onActiveFocusChanged: triggerSuggestionsVisibility()
onTextChanged: triggerSuggestionsVisibility()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/iconutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QImage createSvgImageWithCustomColor(const QString &fileName,
const auto sizeToUse = requestedSize.isValid() || originalSize == nullptr ? requestedSize : *originalSize;

// some icons are present in white or black only, so, we need to check both when needed
const auto iconBaseColors = QStringList{QStringLiteral("black"), QStringLiteral("white")};
const auto iconBaseColors = QStringList{QStringLiteral("black"), QStringLiteral("white"), QStringLiteral("colored")};
const auto customColorImage = findImageWithCustomColor(fileName, customColor, iconBaseColors, sizeToUse);

if (!customColorImage.isNull()) {
Expand Down
3 changes: 1 addition & 2 deletions src/gui/tray/CallNotificationDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ ApplicationWindow {
onStopNotifying: root.closeNotification()
}

Audio {
SoundEffect {
id: ringSound
source: root.ringtonePath
loops: 9 // about 45 seconds of audio playing
audioRole: Audio.RingtoneRole
}

Rectangle {
Expand Down
7 changes: 7 additions & 0 deletions src/gui/tray/TalkReplyTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ TextField {

onAccepted: sendReplyMessage()

verticalAlignment: Qt.AlignVCenter
background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}

Button {
id: sendReplyMessageButton

Expand Down
1 change: 1 addition & 0 deletions src/gui/tray/TrayFolderListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ MenuItem {
anchors.fill: parent
anchors.margins: Style.normalBorderWidth
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
radius: Style.halfTrayWindowRadius
}
}

Expand Down
14 changes: 10 additions & 4 deletions src/gui/tray/TrayFoldersMenuButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ HeaderButton {

cache: true

source: "image://svgimage-custom-color/folder.svg/"
source: "image://svgimage-custom-color/folder.svg/" + palette.windowText
sourceSize {
width: imageWidth
height: imageHeight
Expand Down Expand Up @@ -144,7 +144,7 @@ HeaderButton {

cache: true

source: "image://svgimage-custom-color/caret-down.svg/"
source: "image://svgimage-custom-color/caret-down.svg/" + palette.windowText
sourceSize {
width: openLocalFolderButtonCaretIconLoader.imageWidth
height: openLocalFolderButtonCaretIconLoader.imageHeight
Expand Down Expand Up @@ -178,6 +178,12 @@ HeaderButton {
height: implicitHeight + y > Style.trayWindowHeight ? Style.trayWindowHeight - y : implicitHeight
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape

background: Rectangle {
border.color: palette.dark
color: palette.window
radius: Style.trayWindowRadius
}

contentItem: ScrollView {
id: foldersMenuScrollView

Expand Down Expand Up @@ -208,9 +214,9 @@ HeaderButton {
subline: model.modelData.parentPath
width: foldersMenuListView.width
height: Style.standardPrimaryButtonHeight
backgroundIconSource: "image://svgimage-custom-color/folder.svg/"
backgroundIconSource: "image://svgimage-custom-color/folder.svg/" + palette.windowText
iconSource: isGroupFolder
? "image://svgimage-custom-color/account-group.svg/"
? "image://svgimage-custom-color/account-group.svg/" + palette.windowText
: ""

onTriggered: {
Expand Down
7 changes: 7 additions & 0 deletions src/gui/tray/UnifiedSearchInputContainer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ TextField {
rightPadding: trayWindowUnifiedSearchTextFieldClearTextButton.width + trayWindowUnifiedSearchTextFieldClearTextButton.anchors.rightMargin + textFieldHorizontalPaddingOffset

placeholderText: qsTr("Search files, messages, events …")
verticalAlignment: Qt.AlignVCenter

selectByMouse: true

background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}

Image {
id: trayWindowUnifiedSearchTextFieldSearchIcon
width: Style.trayListItemIconSize - anchors.leftMargin
Expand Down
29 changes: 26 additions & 3 deletions src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ AbstractButton {
color: (userLine.hovered || userLine.visualFocus) &&
!(userMoreButton.hovered || userMoreButton.visualFocus) ?
palette.highlight : palette.window
radius: Style.halfTrayWindowRadius
}

contentItem: RowLayout {
Expand All @@ -48,7 +49,7 @@ AbstractButton {

Image {
id: accountAvatar
Layout.leftMargin: 7
Layout.leftMargin: Style.accountIconsMenuMargin
verticalAlignment: Qt.AlignCenter
cache: false
source: model.avatar !== "" ? model.avatar : Theme.darkMode ? "image://avatars/fallbackWhite" : "image://avatars/fallbackBlack"
Expand All @@ -62,7 +63,7 @@ AbstractButton {
height: width
anchors.bottom: accountAvatar.bottom
anchors.right: accountAvatar.right
radius: width*0.5
radius: width * Style.trayFolderStatusIndicatorRadiusFactor
}

Image {
Expand Down Expand Up @@ -148,21 +149,33 @@ AbstractButton {

Image {
anchors.fill: parent
source: "image://svgimage-custom-color/more.svg/"
source: "image://svgimage-custom-color/more.svg/" + palette.windowText
fillMode: Image.PreserveAspectFit
anchors.rightMargin: Style.accountLabelsAnchorsMargin
}

AutoSizingMenu {
id: userMoreButtonMenu
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape

background: Rectangle {
border.color: palette.dark
radius: Style.halfTrayWindowRadius
color: palette.window
}

MenuItem {
visible: model.isConnected && model.serverHasUserStatus
height: visible ? implicitHeight : 0
text: qsTr("Set status")
font.pixelSize: Style.topLinePixelSize
hoverEnabled: true
onClicked: showUserStatusSelector(index)

background: Rectangle {
radius: Style.halfTrayWindowRadius
color: parent.hovered ? palette.highlight : palette.window
}
}

MenuItem {
Expand All @@ -185,6 +198,11 @@ AbstractButton {
}
accountMenu.close()
}

background: Rectangle {
radius: Style.halfTrayWindowRadius
color: parent.hovered ? palette.highlight : palette.window
}
}

MenuItem {
Expand All @@ -200,6 +218,11 @@ AbstractButton {
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.onPressAction: removeAccountButton.clicked()

background: Rectangle {
radius: Style.halfTrayWindowRadius
color: parent.hovered ? palette.highlight : palette.window
}
}
}
}
Expand Down
Loading
Loading