diff --git a/daemon b/daemon index e037e6358c8f720b0ece5913361dec39777004ab..ebcfa3eadac3ed44c8487f0f631e104614382282 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit e037e6358c8f720b0ece5913361dec39777004ab +Subproject commit ebcfa3eadac3ed44c8487f0f631e104614382282 diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml index fb0c94944a55cfe0c90c1238bae9d090787a5475..95c941797095451ebc7957985c464c4599d0259b 100644 --- a/src/app/constant/JamiTheme.qml +++ b/src/app/constant/JamiTheme.qml @@ -376,7 +376,7 @@ Item { property real chatViewHairLineSize: 1 property real chatViewMaximumWidth: 900 property real chatViewHeaderPreferredHeight: 64 - property real chatViewHeaderMinimumWidth: 200 + property real chatViewHeaderMinimumWidth: 430 property real chatViewFooterPreferredHeight: 50 property real chatViewFooterMaximumHeight: 280 property real chatViewFooterRowSpacing: 1 @@ -497,7 +497,7 @@ Item { property int keyboardShortcutDelegateSize: 50 // Main application spec - property real mainViewMinWidth: 332 + property real mainViewMinWidth: 430 property real mainViewMinHeight: 500 property real wizardViewMinWidth: 500 diff --git a/src/app/mainview/MainView.qml b/src/app/mainview/MainView.qml index c219122790b27ed35a7d94275570934841a40f30..1aa44c24a1eaee665c5a49c9eea7be701db8796b 100644 --- a/src/app/mainview/MainView.qml +++ b/src/app/mainview/MainView.qml @@ -40,9 +40,10 @@ Rectangle { objectName: "mainView" property int sidePanelViewStackCurrentWidth: 300 - property int mainViewStackPreferredWidth: 425 + property int mainViewStackPreferredWidth: sidePanelViewStackCurrentWidth + JamiTheme.chatViewHeaderMinimumWidth property int settingsViewPreferredWidth: 460 property int onWidthChangedTriggerDistance: 5 + property int lastSideBarSplitSize: sidePanelViewStackCurrentWidth property bool sidePanelOnly: (!mainViewStack.visible) && sidePanelViewStack.visible property int previousWidth: width @@ -269,6 +270,7 @@ Rectangle { id: mainViewSidePanelRect SplitView.maximumWidth: splitView.width + SplitView.minimumWidth: sidePanelViewStackCurrentWidth SplitView.preferredWidth: sidePanelViewStackCurrentWidth SplitView.fillHeight: true color: JamiTheme.backgroundColor @@ -313,6 +315,7 @@ Rectangle { initialItem: welcomePage SplitView.maximumWidth: splitView.width + SplitView.minimumWidth: JamiTheme.chatViewHeaderMinimumWidth SplitView.preferredWidth: mainViewStackPreferredWidth SplitView.fillHeight: true @@ -445,12 +448,11 @@ Rectangle { onWidthChanged: { // Hide unnecessary stackview when width is changed. - var widthToCompare = previousWidth < mainView.width ? - 0 : - (inSettingsView ? settingsViewPreferredWidth : mainViewStackPreferredWidth) + var isExpanding = previousWidth < mainView.width - if (mainView.width < widthToCompare - onWidthChangedTriggerDistance - && mainViewStack.visible) { + if (mainView.width < JamiTheme.chatViewHeaderMinimumWidth + mainViewSidePanelRect.width + && mainViewStack.visible && !isExpanding) { + lastSideBarSplitSize = mainViewSidePanelRect.width mainViewStack.visible = false // The find callback function is called for each item in the stack. @@ -465,8 +467,8 @@ Rectangle { } else if (inWelcomeViewStack) recursionStackViewItemMove(mainViewStack, sidePanelViewStack) - } else if (mainView.width >= widthToCompare + onWidthChangedTriggerDistance - && !mainViewStack.visible) { + } else if (mainView.width >= lastSideBarSplitSize + JamiTheme.chatViewHeaderMinimumWidth + && !mainViewStack.visible && isExpanding && !layoutManager.isFullScreen) { mainViewStack.visible = true var inSidePanelViewStack = sidePanelViewStack.find(