Getting into shape for possible release.

This commit is contained in:
j1nx 2021-01-24 21:08:05 +01:00
parent c82028beed
commit 0238263f65
6 changed files with 79 additions and 5 deletions

View File

@ -0,0 +1,74 @@
From 1d29ceca0ac37d881d3755ff65bb11b73d9516a2 Mon Sep 17 00:00:00 2001
From: Aditya Mehra <aix.m@outlook.com>
Date: Thu, 21 Jan 2021 17:49:20 +0530
Subject: [PATCH] Use the correct delegate and fix layouts
---
mycroft/res/ui/SYSTEM_TextFrame.qml | 47 +++++++++++++++--------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/mycroft/res/ui/SYSTEM_TextFrame.qml b/mycroft/res/ui/SYSTEM_TextFrame.qml
index a2d50ed403c..d542a31eca1 100644
--- a/mycroft/res/ui/SYSTEM_TextFrame.qml
+++ b/mycroft/res/ui/SYSTEM_TextFrame.qml
@@ -5,7 +5,7 @@ import org.kde.kirigami 2.4 as Kirigami
import Mycroft 1.0 as Mycroft
-Mycroft.ProportionalDelegate {
+Mycroft.Delegate {
id: systemTextFrame
skillBackgroundColorOverlay: "#000000"
property bool hasTitle: sessionData.title.length > 0 ? true : false
@@ -13,27 +13,30 @@ Mycroft.ProportionalDelegate {
Component.onCompleted: {
console.log(hasTitle)
}
-
- Mycroft.AutoFitLabel {
- id: systemTextFrameTitle
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 20
- wrapMode: Text.Wrap
- visible: hasTitle
- enabled: hasTitle
- font.family: "Noto Sans"
- font.weight: Font.Bold
- text: sessionData.title
- }
-
- Mycroft.AutoFitLabel {
- id: systemTextFrameMainBody
- Layout.fillWidth: true
- Layout.preferredHeight: proportionalGridUnit * 30
- wrapMode: Text.Wrap
- font.family: "Noto Sans"
- font.weight: Font.Bold
- text: sessionData.text
+
+ contentItem: ColumnLayout {
+ Label {
+ id: systemTextFrameTitle
+ Layout.fillWidth: true
+ font.pixelSize: Math.min(systemTextFrame.height/4, Math.max(systemTextFrame.height/10, systemTextFrameMainBody.fontInfo.pixelSize * 1.4))
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+ visible: hasTitle
+ enabled: hasTitle
+ font.family: "Noto Sans"
+ font.weight: Font.Bold
+ text: sessionData.title
+ }
+
+ Mycroft.AutoFitLabel {
+ id: systemTextFrameMainBody
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ wrapMode: Text.Wrap
+ font.family: "Noto Sans"
+ font.weight: Font.Bold
+ text: sessionData.text
+ }
}
}

View File

@ -1 +1 @@
sha256 13e41ed6515ba8235eab2478d0a4518804f166127c3307de05143d88811da7dc python-mycroft-1a179dacab94869079755beb83eac735e8d3efe5.tar.gz
sha256 59b79510ef2e45421d9460789447018820e5f409fcc12218f861baa5b078dd94 python-mycroft-8020e54eaff9ab064bf56dac6ff3c67da4574a97.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
PYTHON_MYCROFT_VERSION = 1a179dacab94869079755beb83eac735e8d3efe5
PYTHON_MYCROFT_VERSION = 8020e54eaff9ab064bf56dac6ff3c67da4574a97
PYTHON_MYCROFT_SITE = $(call github,MycroftAI,mycroft-core,$(PYTHON_MYCROFT_VERSION))
PYTHON_MYCROFT_SETUP_TYPE = setuptools
PYTHON_MYCROFT_LICENSE_FILES = LICENSE

View File

@ -1 +1 @@
sha256 0687a7c7bfee4451574f4d2924d9e3e78cb1dbe1df0d214cf724cf0e735dd5bc python-ovos-utils-e61410a1ed661ba0f694369c5707e97c6bc810bb.tar.gz
sha256 24204937c11bc0020ab43a91a5857ef33bea34f1dab790e416f0a7ce87495fc3 python-ovos-utils-baf507994dae1989899ee118e7064a7bd2912427.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
PYTHON_OVOS_UTILS_VERSION = e61410a1ed661ba0f694369c5707e97c6bc810bb
PYTHON_OVOS_UTILS_VERSION = baf507994dae1989899ee118e7064a7bd2912427
PYTHON_OVOS_UTILS_SITE = $(call github,OpenVoiceOS,ovos_utils,$(PYTHON_OVOS_UTILS_VERSION))
PYTHON_OVOS_UTILS_SETUP_TYPE = setuptools
PYTHON_OVOS_UTILS_LICENSE_FILES = LICENSE

@ -1 +1 @@
Subproject commit 08562c63c70b17bedf0fe8d1ee678e55575da07b
Subproject commit 1973ad0978516f11f5217af9f8303d82831e507d