Преглед на файлове

Merge pull request #5145 from nextcloud/feature/userstatusselector-modal

Make user status selector modal, show user header
Claudio Cambra преди 3 години
родител
ревизия
de7976eb83
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 2
      src/gui/UserStatusSelectorPage.qml
  2. 2 2
      src/gui/tray/Window.qml
  3. 1 0
      theme/Style/Style.qml

+ 1 - 2
src/gui/UserStatusSelectorPage.qml

@@ -39,7 +39,6 @@ Page {
     contentItem: UserStatusSelector {
     contentItem: UserStatusSelector {
         id: userStatusSelector
         id: userStatusSelector
         userStatusSelectorModel: model
         userStatusSelectorModel: model
-        onImplicitHeightChanged: implicitHeight > page.availableHeight ?
-            spacing = Style.standardSpacing : spacing = Style.standardSpacing * 2
+        spacing: Style.standardSpacing
     }
     }
 }
 }

+ 2 - 2
src/gui/tray/Window.qml

@@ -106,10 +106,10 @@ ApplicationWindow {
     Drawer {
     Drawer {
         id: userStatusDrawer
         id: userStatusDrawer
         width: parent.width
         width: parent.width
-        height: parent.height
+        height: parent.height - Style.trayDrawerMargin
         padding: 0
         padding: 0
         edge: Qt.BottomEdge
         edge: Qt.BottomEdge
-        modal: false
+        modal: true
         visible: false
         visible: false
 
 
         background: Rectangle {
         background: Rectangle {

+ 1 - 0
theme/Style/Style.qml

@@ -42,6 +42,7 @@ QtObject {
     property int trayModalWidth: 380
     property int trayModalWidth: 380
     property int trayModalHeight: 490
     property int trayModalHeight: 490
     property int trayListItemIconSize: accountAvatarSize
     property int trayListItemIconSize: accountAvatarSize
+    property int trayDrawerMargin: trayWindowHeaderHeight
     property real thumbnailImageSizeReduction: 0.2  // We reserve some space within the thumbnail "item", here about 20%.
     property real thumbnailImageSizeReduction: 0.2  // We reserve some space within the thumbnail "item", here about 20%.
                                                     // This is because we need to also add the added/modified icon and we
                                                     // This is because we need to also add the added/modified icon and we
                                                     // want them to fit within the general icon size. We also need to know
                                                     // want them to fit within the general icon size. We also need to know