refactor: move `PopupMenu` to ui/shared/popups
This commit is contained in:
parent
a78ac5687b
commit
fa3adb30e4
|
@ -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 () {}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue