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

fix colours in dark mode #7755

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 3 additions & 5 deletions src/gui/filedetails/ShareeSearchField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ TextField {
}

readonly property int horizontalPaddingOffset: Style.trayHorizontalMargin
readonly property color placeholderColor: palette.dark
readonly property double iconsScaleFactor: 0.6

function triggerSuggestionsVisibility() {
shareeListView.count > 0 ? suggestionsPopup.open() : suggestionsPopup.close();
}

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)

Expand Down Expand Up @@ -109,7 +107,7 @@ TextField {
fillMode: Image.PreserveAspectFit
horizontalAlignment: Image.AlignLeft

source: "image://svgimage-custom-color/search.svg" + "/" + root.placeholderColor
source: "image://svgimage-custom-color/search.svg" + "/" + palette.placeholderText
sourceSize: Qt.size(parent.height * root.iconsScaleFactor, parent.height * root.iconsScaleFactor)

visible: !root.shareeModel.fetchOngoing
Expand All @@ -125,7 +123,7 @@ TextField {
}

width: height
color: root.placeholderColor
color: palette.placeholderText
visible: root.shareeModel.fetchOngoing
running: visible
}
Expand All @@ -147,7 +145,7 @@ TextField {
mipmap: true
fillMode: Image.PreserveAspectFit

source: "image://svgimage-custom-color/clear.svg" + "/" + root.placeholderColor
source: "image://svgimage-custom-color/clear.svg" + "/" + palette.placeholderText
sourceSize: Qt.size(parent.height * root.iconsScaleFactor, parent.height * root.iconsScaleFactor)

visible: root.text
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/ActivityList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ ScrollView {
verticalAlignment: Image.AlignVCenter
horizontalAlignment: Image.AlignHCenter
fillMode: Image.PreserveAspectFit
source: "image://svgimage-custom-color/activity.svg/" + palette.dark
source: "image://svgimage-custom-color/activity.svg/" + palette.windowText
}

EnforcedPlainTextLabel {
Expand Down
3 changes: 1 addition & 2 deletions src/gui/tray/UnifiedSearchInputContainer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ TextField {

property bool isSearchInProgress: false

readonly property color textFieldIconsColor: palette.dark
readonly property color placeholderColor: palette.dark
readonly property color textFieldIconsColor: palette.placeholderText

readonly property int iconInset: Style.smallSpacing

Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/UnifiedSearchPlaceholderView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ColumnLayout {
}

Image {
source: "image://svgimage-custom-color/magnifying-glass.svg"
source: `image://svgimage-custom-color/magnifying-glass.svg/${palette.windowText}`
sourceSize.width: Style.trayWindowHeaderHeight / 2
sourceSize.height: Style.trayWindowHeaderHeight / 2
Layout.alignment: Qt.AlignHCenter
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/UnifiedSearchResultNothingFound.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ColumnLayout {

Image {
id: unifiedSearchResultsNoResultsLabelIcon
source: "image://svgimage-custom-color/magnifying-glass.svg"
source: `image://svgimage-custom-color/magnifying-glass.svg/${palette.windowText}`
sourceSize.width: Style.trayWindowHeaderHeight / 2
sourceSize.height: Style.trayWindowHeaderHeight / 2
Layout.alignment: Qt.AlignHCenter
Expand Down
7 changes: 6 additions & 1 deletion src/gui/tray/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
}
} else {
// We have an activity
return a._icon.isEmpty() ? colorIconPath.arg("activity.svg") : colorIconPath.arg(a._icon);
if (a._icon.isEmpty()) {
return colorIconPath.arg("activity.svg");
}

// using tray-image-provider here as it can read from URLs
return QStringLiteral("image://tray-image-provider/%1").arg(a._icon);
}
};

Expand Down
Loading