summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-09-15 17:57:15 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-09-15 17:57:15 +0200
commit05eb688e31accbc1a40677145ad2cada24e798c7 (patch)
treeff5d73709a1cd43e523823d11b5d1effb5799327
parent6d8ac64798cce8e60f7cd93a400ac848d9d1990e (diff)
downloadkube-05eb688e31accbc1a40677145ad2cada24e798c7.tar.gz
kube-05eb688e31accbc1a40677145ad2cada24e798c7.zip
mailview relayout when we can't fit it all nicely
-rw-r--r--components/kube/contents/ui/Kube.qml1
-rw-r--r--components/kube/contents/ui/MailView.qml28
2 files changed, 20 insertions, 9 deletions
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml
index d94449ba..a11d6e2f 100644
--- a/components/kube/contents/ui/Kube.qml
+++ b/components/kube/contents/ui/Kube.qml
@@ -28,6 +28,7 @@ Controls2.ApplicationWindow {
28 id: app 28 id: app
29 29
30 property int sidebarWidth: Kube.Units.gridUnit + Kube.Units.largeSpacing 30 property int sidebarWidth: Kube.Units.gridUnit + Kube.Units.largeSpacing
31 property bool small: app.width < Kube.Units.gridUnit * 50
31 32
32 height: Screen.desktopAvailableHeight * 0.8 33 height: Screen.desktopAvailableHeight * 0.8
33 width: Screen.desktopAvailableWidth * 0.8 34 width: Screen.desktopAvailableWidth * 0.8
diff --git a/components/kube/contents/ui/MailView.qml b/components/kube/contents/ui/MailView.qml
index 4bcb9b44..0c955fc6 100644
--- a/components/kube/contents/ui/MailView.qml
+++ b/components/kube/contents/ui/MailView.qml
@@ -26,11 +26,13 @@ import QtQuick.Layouts 1.1
26import org.kube.framework 1.0 as Kube 26import org.kube.framework 1.0 as Kube
27 27
28FocusScope { 28FocusScope {
29 SplitView { 29 RowLayout {
30 anchors.fill: parent 30 anchors.fill: parent
31 spacing: 1
31 Rectangle { 32 Rectangle {
32 width: Kube.Units.gridUnit * 10 33 width: Kube.Units.gridUnit * 10
33 Layout.minimumWidth: Kube.Units.gridUnit * 5 34 Layout.fillHeight: parent.height
35 visible: !app.small
34 36
35 color: Kube.Colors.textColor 37 color: Kube.Colors.textColor
36 38
@@ -95,18 +97,26 @@ FocusScope {
95 } 97 }
96 } 98 }
97 99
98 Kube.MailListView { 100 Rectangle {
99 id: mailListView 101 Layout.preferredWidth: app.small ? Kube.Units.gridUnit * 12 : Kube.Units.gridUnit * 20
100 width: Kube.Units.gridUnit * 20 102 Layout.fillHeight: parent.height
101 height: parent.height 103
102 activeFocusOnTab: true 104 color: "transparent"
103 Layout.minimumWidth: Kube.Units.gridUnit * 10 105 border.width: 1
106 border.color: Kube.Colors.buttonColor
107
108 Kube.MailListView {
109 id: mailListView
110 anchors.fill: parent
111 activeFocusOnTab: true
112 Layout.minimumWidth: Kube.Units.gridUnit * 10
113 }
104 } 114 }
105 115
106 Kube.ConversationView { 116 Kube.ConversationView {
107 id: mailView 117 id: mailView
108 Layout.fillWidth: true 118 Layout.fillWidth: true
109 Layout.minimumWidth: Kube.Units.gridUnit * 5 119 Layout.fillHeight: parent.height
110 activeFocusOnTab: true 120 activeFocusOnTab: true
111 } 121 }
112 } 122 }