@@ -8,6 +8,9 @@ import EVChargerApp
|
||||
ScrollableTabPage {
|
||||
id: page
|
||||
|
||||
contentWidth: width
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
|
||||
property real chartCurrentTime: 0
|
||||
property string historyRange: "day"
|
||||
property int historyOffset: 0
|
||||
@@ -271,6 +274,8 @@ ScrollableTabPage {
|
||||
StackLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.preferredWidth: Math.max(0, page.width - 30)
|
||||
Layout.maximumWidth: Math.max(0, page.width - 30)
|
||||
Layout.preferredHeight: currentIndex === 0
|
||||
? manufacturerContent.implicitHeight
|
||||
: ownCloudContent.implicitHeight
|
||||
@@ -280,6 +285,7 @@ ScrollableTabPage {
|
||||
id: manufacturerContent
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.maximumWidth: parent.width
|
||||
spacing: 5
|
||||
|
||||
Text {
|
||||
@@ -345,10 +351,12 @@ ScrollableTabPage {
|
||||
id: ownCloudContent
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.maximumWidth: parent.width
|
||||
spacing: 8
|
||||
|
||||
SettingsCard {
|
||||
Layout.minimumWidth: 0
|
||||
Layout.maximumWidth: ownCloudContent.width
|
||||
SettingsSectionLabel {
|
||||
Layout.minimumWidth: 0
|
||||
text: qsTr("Own your consumption history")
|
||||
@@ -484,6 +492,8 @@ ScrollableTabPage {
|
||||
WhiteBox {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.preferredWidth: ownCloudContent.width
|
||||
Layout.maximumWidth: ownCloudContent.width
|
||||
visible: !homeAssistant.configured || homeAssistant.charts.length === 0
|
||||
implicitHeight: historyPlaceholder.implicitHeight + 30
|
||||
|
||||
@@ -502,6 +512,7 @@ ScrollableTabPage {
|
||||
SettingsLabel {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.maximumWidth: historyPlaceholder.width
|
||||
text: !homeAssistant.configured
|
||||
? qsTr("Connect Home Assistant to display history")
|
||||
: qsTr("Create your first history chart")
|
||||
@@ -511,6 +522,7 @@ ScrollableTabPage {
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 0
|
||||
Layout.maximumWidth: historyPlaceholder.width
|
||||
text: !homeAssistant.configured
|
||||
? qsTr("The setup wizard connects to your server and lets you select the entities to display.")
|
||||
: qsTr("Open the configuration and add a chart with one or more Home Assistant entities.")
|
||||
|
||||
Reference in New Issue
Block a user