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

Dev #235

Merged
merged 3 commits into from
Jun 2, 2024
Merged

Dev #235

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
5 changes: 4 additions & 1 deletion AppGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ LauncherPage {
"headerPointSize": mainView.mediumFontSize,
"innerSpacing": mainView.innerSpacing,
"backgroundOpacity": mainView.backgroundOpacity,
"accentColor": mainView.accentColor,
"desaturation": settings.useColoredIcons ? 0.0 : 1.0,
"pinnedShortcuts": index === 0 ? appLauncher.pinnedShortcuts : new Array,
"apps": appGroupInfos["apps"]}
Expand Down Expand Up @@ -369,7 +370,7 @@ LauncherPage {
background: Rectangle {
id: menuBackground
implicitWidth: contextMenu.menuWidth
color: Universal.accent
color: mainView.accentColor
radius: mainView.innerSpacing
}

Expand Down Expand Up @@ -512,6 +513,8 @@ LauncherPage {
var groupedApps = appLauncher.getGroupedApps(appsArray)
appLauncher.appGroups = new Array
appLauncher.createAppGroups(groupedApps)
// Workaround, if users didn't update the os version
if (!appsString.includes("org.fossify.gallery")) mainView.galleryApp = "com.simplemobiletools.gallery.pro"
} else {
console.log("AppLauncher | Need to retrieve apps from system")
mainView.updateSpinner(true)
Expand Down
4 changes: 3 additions & 1 deletion AppGroup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Item {
property double headerPointSize
property double backgroundOpacity
property double desaturation: 1.0
property var accentColor


property int groupIndex: 0
property int selectedGroupIndex: 1
Expand Down Expand Up @@ -268,7 +270,7 @@ Item {
width: parent.width * 0.15
height: parent.width * 0.15
radius: height * 0.5
color: Universal.accent
color: accentColor
}
}

Expand Down
3 changes: 2 additions & 1 deletion Checkbox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CheckBox {
property bool hasDescriptionButton: false
property bool isToggle: false
property int startX: 0
property var accentColor

width: parent.width
text: qsTr("Chip")
Expand Down Expand Up @@ -68,7 +69,7 @@ CheckBox {
x: settingsCheckbox.leftPadding
y: settingsCheckbox.height / 2 - circleSize / 2
radius: width / 2
color: settingsCheckbox.checked ? Universal.accent : Universal.foreground
color: settingsCheckbox.checked ? accentColor : Universal.foreground
opacity: settingsCheckbox.checked ? 1.0 : 0.3
}

Expand Down
33 changes: 20 additions & 13 deletions Collections.qml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ LauncherPage {
id: listView
anchors.fill: parent
headerPositioning: mainView.backgroundOpacity === 1.0 ? ListView.PullBackHeader : ListView.InlineHeader
clip: true

header: Column {
id: header
Expand Down Expand Up @@ -348,7 +349,7 @@ LauncherPage {
}
GradientStop {
position: 1.0
color: backgroundItem.isMenuStatus ? Universal.accent : contactColumn.gradientColer
color: backgroundItem.isMenuStatus ? mainView.accemtColor : contactColumn.gradientColer
}
}
visible: mainView.backgroundOpacity === 1.0
Expand All @@ -359,12 +360,21 @@ LauncherPage {
width: contactColumn.columnWidth
text: model.c_TEXT !== undefined ? model.c_TEXT : ""
font.pointSize: mainView.largeFontSize
color: backgroundItem.isMenuStatus ? "white" : mainView.fontColor
//renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
lineHeight: 1.1
opacity: 0.9
color: backgroundItem.isMenuStatus ? "white" : mainView.fontColor
wrapMode: Text.WordWrap
elide: Text.ElideRight
visible: model.c_TEXT !== undefined

// Workaround
// onLineLaidOut: {
// console.log("Collection | LINE " + line.x + ", " + line.y)
// line.x = 110
// line.y = line.y * 1.5
// }
}
Row {
id: statusRow
Expand All @@ -376,7 +386,7 @@ LauncherPage {
height: mainView.smallFontSize * 0.6
y: mainView.smallFontSize * 0.3
radius: height * 0.5
color: backgroundItem.isMenuStatus ? "transparent" : Universal.accent
color: backgroundItem.isMenuStatus ? "transparent" : mainView.accentColor
}
Label {
id: statusLabel
Expand Down Expand Up @@ -405,7 +415,7 @@ LauncherPage {
}
GradientStop {
position: 1.0
color: backgroundItem.isMenuStatus ? Universal.accent : contactColumn.gradientColer
color: backgroundItem.isMenuStatus ? mainView.accentColor : contactColumn.gradientColer
}
}
visible: mainView.backgroundOpacity === 1.0
Expand Down Expand Up @@ -451,7 +461,7 @@ LauncherPage {
width: collectionPage.iconSize * 0.25
height: collectionPage.iconSize * 0.25
radius: height * 0.5
color: Universal.accent
color: mainView.accentColor
}
Column {
id: contactMenu
Expand Down Expand Up @@ -533,7 +543,7 @@ LauncherPage {
onPressAndHold: {
if (currentCollectionMode === mainView.collectionMode.People) {
contactMenu.visible = true
contactBox.color = Universal.accent
contactBox.color = mainView.accentColor
preventStealing = true
isMenuStatus = true
}
Expand Down Expand Up @@ -625,9 +635,9 @@ LauncherPage {
var now = new Date()

collectionPage.threads.forEach(function (thread, index) {
console.log("Collections | Thread: " + thread["address"])
if ((!thread["read"] || now.getTime() - thread["date"] < collectionPage.messageAge) && thread["address"] !== undefined) {
console.log("Collections | Thread matched: " + thread["address"])
console.log("Collections | Thread: " + thread["address"] + ", " + thread["person"])
if ((!thread["read"] || now.getTime() - thread["date"] < collectionPage.messageAge)
&& (thread["address"].length > 0 || thread["person"] !== undefined)) {
if (thread["isSignal"]) contactThreads[thread["person"]] = thread
else contactThreads[thread["address"]] = thread
}
Expand Down Expand Up @@ -750,7 +760,6 @@ LauncherPage {
for (var i = 0; i < modelArr.length; i++) {
var aContact = modelArr[i]
if (aContact.c_ID === contactId) {
console.log("Collections | Contact in list model matched")
aContact.c_ICON = contactImage
modelArr[i] = aContact
break
Expand All @@ -759,7 +768,6 @@ LauncherPage {
for (i = 0; i < count; i++) {
var elem = get(i)
if (elem.c_ID === contactId) {
console.log("Collections | Contact in list view matched")
elem.c_ICON = "data:image/png;base64," + contactImage
set(i, elem)
break
Expand All @@ -768,7 +776,6 @@ LauncherPage {
for (i = 0; i < mainView.getContacts().length; i++) {
aContact = mainView.getContacts()[i]
if (aContact["id"] === contactId) {
console.log("Collections | Contact in contacts matched")
aContact["icon"] = contactImage
mainView.getContacts()[i] = aContact
break
Expand Down Expand Up @@ -1382,7 +1389,7 @@ LauncherPage {
icon.source: Qt.resolvedUrl("icons/notes@4x.png")

onPressed: {
backgroundRec.color = Universal.accent
backgroundRec.color = mainView.accentColor
opacity: 1.0
}

Expand Down
3 changes: 2 additions & 1 deletion Conversation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ LauncherPage {

ListView {
id: listView
clip: true
anchors.top: parent.top
width: parent.width
height: parent.height
Expand Down Expand Up @@ -603,7 +604,7 @@ LauncherPage {
width: messageBox.width * widthFactor
text: model.m_ERROR !== undefined ? model.m_ERROR : ""
font.pointSize: mainView.smallFontSize
color: Universal.accent
color: mainView.accentColor
clip: true
opacity: 0.5
horizontalAlignment: Text.AlignLeft
Expand Down
2 changes: 1 addition & 1 deletion Details.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ LauncherPage {
height: mainView.smallFontSize * 0.6
y: (pinButton.height - pinBadge.height) * 0.5
radius: height * 0.5
color: Universal.accent
color: mainView.accentColor
onVisibleChanged: {
dateLabel.leftPadding = pinBadge.visible ? 0.8 : 0.0
}
Expand Down
Loading
Loading