refactor: move `PopupMenu` to ui/shared/popups

This commit is contained in:
Pascal Precht 2021-10-14 13:48:03 +02:00 committed by Iuri Matias
parent a78ac5687b
commit fa3adb30e4
17 changed files with 29 additions and 2 deletions

View File

@ -3,9 +3,11 @@ import QtQuick.Controls 2.3
import QtWebEngine 1.9
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import "../../Chat/ChatColumn/ChatComponents"
// TODO: replace with StatusPopupMenu
PopupMenu {
property var addNewTab: function () {}

View File

@ -2,10 +2,12 @@ import QtQuick 2.13
import QtQuick.Controls 2.3
import "../../../../shared"
import "../../../../shared/popups"
import "../stores"
import utils 1.0
// TODO: replace with StatusPopupMenu
PopupMenu {
id: downloadMenu

View File

@ -2,12 +2,14 @@ import QtQuick 2.13
import QtQuick.Controls 2.3
import QtWebEngine 1.9
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import "../stores"
import utils 1.0
import "../../Chat/ChatColumn/ChatComponents"
// TODO: replace with StatusPopupMenu
PopupMenu {
property var openInNewTab: function () {}
property string url

View File

@ -3,6 +3,7 @@ import QtQuick.Controls 2.13
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/popups"
import "../../../../../shared/status"
import ".."
@ -93,6 +94,7 @@ Item {
id: moreActionsBtn
onClicked: moreActionsMenu.open()
// TODO: replace with StatusPopupMenu
PopupMenu {
id: moreActionsMenu
x: moreActionsBtn.width - moreActionsMenu.width

View File

@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
Row {
@ -57,6 +58,7 @@ Row {
}
}
// TODO: replace with StatusPopupMenu
PopupMenu {
id: contactContextMenu
hasArrow: false

View File

@ -2,10 +2,12 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import utils 1.0
// TODO: replace with StatusPopupmenu
PopupMenu {
//% "Fetch Messages"
title: qsTrId("fetch-messages")

View File

@ -344,6 +344,7 @@ ModalPopup {
contextMenu.popup(-contextMenu.width / 2 + moreActionsBtn.width / 2, moreActionsBtn.height + 10)
}
cursorShape: Qt.PointingHandCursor
// TODO: replace with StatusPopupMenu
PopupMenu {
id: contextMenu
Action {

View File

@ -9,6 +9,7 @@ import StatusQ.Popups 0.1
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import "./"
@ -168,6 +169,7 @@ StatusPopupMenu {
enabled: false
}
// TODO: replace with StatusPopupMenu
PopupMenu {
id: copyLinkMenu
//% "Copy link"

View File

@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
Rectangle {
@ -94,6 +95,7 @@ Rectangle {
contactContextMenu.popup()
}
// TODO: replace with StatusPopupMenu
PopupMenu {
id: contactContextMenu
hasArrow: false

View File

@ -5,6 +5,7 @@ import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
Item {
@ -92,6 +93,7 @@ Item {
onExited: {
tokenContainer.hovered = false
}
// TODO: replace with StatusPopupMenu
PopupMenu {
id: contextMenu
Action {

View File

@ -5,6 +5,7 @@ import QtQuick.Layouts 1.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import "../popups"
import "../controls"
@ -156,6 +157,7 @@ Item {
anchors.left: receiveBtn.right
anchors.leftMargin: walletMenu.btnOuterMargin
// TODO: replace with StatusPopupMenu
PopupMenu {
id: newSettingsMenu
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent

View File

@ -2,9 +2,11 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../../shared"
import "../../../../shared/popups"
import utils 1.0
// TODO: replace with StatusPopupMenu
PopupMenu {
id: newAccountMenu
width: 260

View File

@ -2,6 +2,7 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import StatusQ.Controls 0.1
import "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
import utils 1.0
@ -27,6 +28,7 @@ StatusFlatButton {
}
}
// TODO: replace with StatusPopupMenu
PopupMenu {
id: newAccountMenu
width: 260

View File

@ -14,6 +14,7 @@ import DotherSide 0.1
import "./app/AppLayouts/Onboarding/views"
import "./app"
import "./shared"
import "./shared/panels"
import "./shared/popups"
import utils 1.0

View File

@ -6,7 +6,9 @@ import QtQml.Models 2.3
import utils 1.0
import "status"
import "./"
import "./popups"
// TODO: replace with StatusPopupMenu
PopupMenu {
id: root
width: profileHeader.width

View File

@ -3,7 +3,7 @@ import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import utils 1.0
import "../shared"
import "../"
Menu {
// This is to add icons to submenu items. QML doesn't have a way to add icons to those sadly so this is a workaround

View File

@ -1,6 +1,5 @@
StyledButton 1.0 StyledButton.qml
RoundedIcon 1.0 RoundedIcon.qml
PopupMenu 1.0 PopupMenu.qml
Separator 1.0 Separator.qml
StatusTabButton 1.0 StatusTabButton.qml
TextWithLabel 1.0 TextWithLabel.qml