Compare commits

...

2 Commits

Author SHA1 Message Date
j1nx 46f64498bd Fix KDEConnect empty plugin list.
We need to set QT plugins path system wide for user sessions
re-enabling all of them but keep them in the mycroft-gui systemd
service file as well, so you can override them there is wanted.
2023-01-14 09:56:00 +01:00
j1nx 5bd80dfbdc Fix no text underneath backend selection buttons.
Pull in the PR for testing
2023-01-14 09:54:56 +01:00
2 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,114 @@
From 9afd419533266c6c94d03673a5dc1faae4eec9f0 Mon Sep 17 00:00:00 2001
From: Aditya Mehra <aix.m@outlook.com>
Date: Thu, 12 Jan 2023 23:57:04 +1030
Subject: [PATCH] fix scaling of buttons on backend select
---
ui/BackendButton.qml | 11 ++++-------
ui/BackendSelect.qml | 13 +++++++++----
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/ui/BackendButton.qml b/ui/BackendButton.qml
index 7b71e49..c36a6c7 100644
--- a/ui/BackendButton.qml
+++ b/ui/BackendButton.qml
@@ -29,6 +29,7 @@ Button {
property string backendIcon
property string backendType
property bool horizontalMode: false
+ property var fontSize
background: Rectangle {
color: backendButtonControl.down ? "transparent" : Kirigami.Theme.highlightColor
@@ -101,9 +102,7 @@ Button {
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
elide: Text.ElideRight
- font.pixelSize: 32
- minimumPixelSize: 8
- fontSizeMode: Text.Fit
+ font.pixelSize: backendButtonControl.fontSize
text: backendButtonContentsLayout.backendName
}
@@ -140,11 +139,9 @@ Button {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 32
- minimumPixelSize: 16
- fontSizeMode: Text.Fit
+ font.pixelSize: backendButtonControl.fontSize
text: backendButtonContentsLayout.backendName
}
}
}
-}
\ No newline at end of file
+}
diff --git a/ui/BackendSelect.qml b/ui/BackendSelect.qml
index 89d6892..506a1ad 100644
--- a/ui/BackendSelect.qml
+++ b/ui/BackendSelect.qml
@@ -25,7 +25,9 @@ import Mycroft 1.0 as Mycroft
Item {
id: backendView
- anchors.fill: parent
+ //anchors.fill: parent
+ width: 700
+ height: 400
property bool horizontalMode: backendView.width > backendView.height ? 1 : 0
Rectangle {
@@ -37,7 +39,7 @@ Item {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
- height: Kirigami.Units.gridUnit * 4
+ height: Kirigami.Units.gridUnit * 3
color: Kirigami.Theme.highlightColor
Kirigami.Icon {
@@ -89,7 +91,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: topArea.bottom
- anchors.margins: Mycroft.Units.gridUnit * 2
+ anchors.margins: Mycroft.Units.gridUnit * 1
Label {
id: warnText
@@ -104,7 +106,7 @@ Item {
Item {
Layout.fillWidth: true
Layout.fillHeight: true
- Layout.margins: horizontalMode ? Kirigami.Units.largeSpacing : 0
+ Layout.margins: horizontalMode ? Kirigami.Units.smallSpacing : 0
GridLayout {
id: backendsGrid
@@ -120,6 +122,7 @@ Item {
backendIcon: Qt.resolvedUrl("icons/selene.svg")
backendType: "selene"
horizontalMode: backendView.horizontalMode
+ fontSize: warnText.font.pixelSize * 0.9
Layout.preferredWidth: horizontalMode ? (parent.width / 3 - Kirigami.Units.gridUnit) : parent.width
Layout.fillHeight: true
@@ -131,6 +134,7 @@ Item {
backendIcon: Qt.resolvedUrl("icons/personal.svg")
backendType: "personal"
horizontalMode: backendView.horizontalMode
+ fontSize: warnText.font.pixelSize * 0.9
Layout.preferredWidth: horizontalMode ? (parent.width / 3 - Kirigami.Units.gridUnit) : parent.width
Layout.fillHeight: true
@@ -142,6 +146,7 @@ Item {
backendIcon: Qt.resolvedUrl("icons/nobackend.svg")
backendType: "offline"
horizontalMode: backendView.horizontalMode
+ fontSize: warnText.font.pixelSize * 0.9
Layout.preferredWidth: horizontalMode ? (parent.width / 3 - Kirigami.Units.gridUnit) : parent.width
Layout.fillHeight: true

View File

@ -0,0 +1,12 @@
[Service]
Environment=QT_QPA_PLATFORM=eglfs
Environment=QT_QPA_EGLFS_KMS_ATOMIC=1
Environment=QT_QPA_PLATFORMTHEME=qt5ct
Environment=QT_PLUGIN_PATH=/usr/lib/qt/plugins:/usr/lib/plugins:/usr/lib/plugins/kf5
Environment=QT_LOGGING_RULES='*=false'
Environment=QT_FILE_SELECTORS=ovos
Environment=QT_FONT_DPI=120
Environment=QT_IM_MODULE=qtvirtualkeyboard
Environment=QT_QUICK_CONTROLS_STYLE=OpenVoiceStyle
Environment=XDG_CURRENT_DESKTOP=kde
Environment=QML2_IMPORT_PATH=/usr/lib/qml