Ming Rui Zhang | 9680887 | 2020-08-27 12:59:09 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 by Savoir-faire Linux |
| 3 | * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | import QtQuick 2.14 |
| 20 | import QtQuick.Controls 2.14 |
| 21 | import QtGraphicalEffects 1.12 |
| 22 | import net.jami.Models 1.0 |
| 23 | |
| 24 | Menu { |
| 25 | id: root |
| 26 | |
| 27 | property int menuItemsPreferredWidth: 220 |
| 28 | property int menuItemsPreferredHeight: 48 |
| 29 | property int generalMenuSeparatorCount: 0 |
| 30 | property int commonBorderWidth: 1 |
| 31 | font.pointSize: JamiTheme.menuFontSize |
| 32 | |
| 33 | function openMenu(){ |
| 34 | visible = true |
| 35 | visible = false |
| 36 | visible = true |
| 37 | } |
| 38 | |
| 39 | background: Rectangle { |
| 40 | implicitWidth: menuItemsPreferredWidth |
| 41 | implicitHeight: menuItemsPreferredHeight |
| 42 | * (root.count - generalMenuSeparatorCount) |
| 43 | |
| 44 | border.width: commonBorderWidth |
| 45 | border.color: JamiTheme.tabbarBorderColor |
| 46 | } |
| 47 | } |