mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-22 06:02:03 +02:00
misc: improve minimum width for chatview
Else messages area not readable Change-Id: If90d9c2f31c99682018273655d5423befdf333ae
This commit is contained in:
parent
3ba007d02b
commit
a35e21f93d
3 changed files with 13 additions and 11 deletions
2
daemon
2
daemon
|
@ -1 +1 @@
|
||||||
Subproject commit e037e6358c8f720b0ece5913361dec39777004ab
|
Subproject commit ebcfa3eadac3ed44c8487f0f631e104614382282
|
|
@ -376,7 +376,7 @@ Item {
|
||||||
property real chatViewHairLineSize: 1
|
property real chatViewHairLineSize: 1
|
||||||
property real chatViewMaximumWidth: 900
|
property real chatViewMaximumWidth: 900
|
||||||
property real chatViewHeaderPreferredHeight: 64
|
property real chatViewHeaderPreferredHeight: 64
|
||||||
property real chatViewHeaderMinimumWidth: 200
|
property real chatViewHeaderMinimumWidth: 430
|
||||||
property real chatViewFooterPreferredHeight: 50
|
property real chatViewFooterPreferredHeight: 50
|
||||||
property real chatViewFooterMaximumHeight: 280
|
property real chatViewFooterMaximumHeight: 280
|
||||||
property real chatViewFooterRowSpacing: 1
|
property real chatViewFooterRowSpacing: 1
|
||||||
|
@ -497,7 +497,7 @@ Item {
|
||||||
property int keyboardShortcutDelegateSize: 50
|
property int keyboardShortcutDelegateSize: 50
|
||||||
|
|
||||||
// Main application spec
|
// Main application spec
|
||||||
property real mainViewMinWidth: 332
|
property real mainViewMinWidth: 430
|
||||||
property real mainViewMinHeight: 500
|
property real mainViewMinHeight: 500
|
||||||
|
|
||||||
property real wizardViewMinWidth: 500
|
property real wizardViewMinWidth: 500
|
||||||
|
|
|
@ -40,9 +40,10 @@ Rectangle {
|
||||||
objectName: "mainView"
|
objectName: "mainView"
|
||||||
|
|
||||||
property int sidePanelViewStackCurrentWidth: 300
|
property int sidePanelViewStackCurrentWidth: 300
|
||||||
property int mainViewStackPreferredWidth: 425
|
property int mainViewStackPreferredWidth: sidePanelViewStackCurrentWidth + JamiTheme.chatViewHeaderMinimumWidth
|
||||||
property int settingsViewPreferredWidth: 460
|
property int settingsViewPreferredWidth: 460
|
||||||
property int onWidthChangedTriggerDistance: 5
|
property int onWidthChangedTriggerDistance: 5
|
||||||
|
property int lastSideBarSplitSize: sidePanelViewStackCurrentWidth
|
||||||
|
|
||||||
property bool sidePanelOnly: (!mainViewStack.visible) && sidePanelViewStack.visible
|
property bool sidePanelOnly: (!mainViewStack.visible) && sidePanelViewStack.visible
|
||||||
property int previousWidth: width
|
property int previousWidth: width
|
||||||
|
@ -269,6 +270,7 @@ Rectangle {
|
||||||
id: mainViewSidePanelRect
|
id: mainViewSidePanelRect
|
||||||
|
|
||||||
SplitView.maximumWidth: splitView.width
|
SplitView.maximumWidth: splitView.width
|
||||||
|
SplitView.minimumWidth: sidePanelViewStackCurrentWidth
|
||||||
SplitView.preferredWidth: sidePanelViewStackCurrentWidth
|
SplitView.preferredWidth: sidePanelViewStackCurrentWidth
|
||||||
SplitView.fillHeight: true
|
SplitView.fillHeight: true
|
||||||
color: JamiTheme.backgroundColor
|
color: JamiTheme.backgroundColor
|
||||||
|
@ -313,6 +315,7 @@ Rectangle {
|
||||||
initialItem: welcomePage
|
initialItem: welcomePage
|
||||||
|
|
||||||
SplitView.maximumWidth: splitView.width
|
SplitView.maximumWidth: splitView.width
|
||||||
|
SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth
|
||||||
SplitView.preferredWidth: mainViewStackPreferredWidth
|
SplitView.preferredWidth: mainViewStackPreferredWidth
|
||||||
SplitView.fillHeight: true
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
@ -445,12 +448,11 @@ Rectangle {
|
||||||
|
|
||||||
onWidthChanged: {
|
onWidthChanged: {
|
||||||
// Hide unnecessary stackview when width is changed.
|
// Hide unnecessary stackview when width is changed.
|
||||||
var widthToCompare = previousWidth < mainView.width ?
|
var isExpanding = previousWidth < mainView.width
|
||||||
0 :
|
|
||||||
(inSettingsView ? settingsViewPreferredWidth : mainViewStackPreferredWidth)
|
|
||||||
|
|
||||||
if (mainView.width < widthToCompare - onWidthChangedTriggerDistance
|
if (mainView.width < JamiTheme.chatViewHeaderMinimumWidth + mainViewSidePanelRect.width
|
||||||
&& mainViewStack.visible) {
|
&& mainViewStack.visible && !isExpanding) {
|
||||||
|
lastSideBarSplitSize = mainViewSidePanelRect.width
|
||||||
mainViewStack.visible = false
|
mainViewStack.visible = false
|
||||||
|
|
||||||
// The find callback function is called for each item in the stack.
|
// The find callback function is called for each item in the stack.
|
||||||
|
@ -465,8 +467,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
else if (inWelcomeViewStack)
|
else if (inWelcomeViewStack)
|
||||||
recursionStackViewItemMove(mainViewStack, sidePanelViewStack)
|
recursionStackViewItemMove(mainViewStack, sidePanelViewStack)
|
||||||
} else if (mainView.width >= widthToCompare + onWidthChangedTriggerDistance
|
} else if (mainView.width >= lastSideBarSplitSize + JamiTheme.chatViewHeaderMinimumWidth
|
||||||
&& !mainViewStack.visible) {
|
&& !mainViewStack.visible && isExpanding && !layoutManager.isFullScreen) {
|
||||||
mainViewStack.visible = true
|
mainViewStack.visible = true
|
||||||
|
|
||||||
var inSidePanelViewStack = sidePanelViewStack.find(
|
var inSidePanelViewStack = sidePanelViewStack.find(
|
||||||
|
|
Loading…
Add table
Reference in a new issue