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 QtWebEngine 1.9
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
import "../../Chat/ChatColumn/ChatComponents"
|
import "../../Chat/ChatColumn/ChatComponents"
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
property var addNewTab: function () {}
|
property var addNewTab: function () {}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,12 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../stores"
|
import "../stores"
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: downloadMenu
|
id: downloadMenu
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,14 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtWebEngine 1.9
|
import QtWebEngine 1.9
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
import "../stores"
|
import "../stores"
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../Chat/ChatColumn/ChatComponents"
|
import "../../Chat/ChatColumn/ChatComponents"
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
property var openInNewTab: function () {}
|
property var openInNewTab: function () {}
|
||||||
property string url
|
property string url
|
||||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick.Controls 2.13
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../../shared"
|
import "../../../../../shared"
|
||||||
|
import "../../../../../shared/popups"
|
||||||
import "../../../../../shared/status"
|
import "../../../../../shared/status"
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@ Item {
|
||||||
id: moreActionsBtn
|
id: moreActionsBtn
|
||||||
onClicked: moreActionsMenu.open()
|
onClicked: moreActionsMenu.open()
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: moreActionsMenu
|
id: moreActionsMenu
|
||||||
x: moreActionsBtn.width - moreActionsMenu.width
|
x: moreActionsBtn.width - moreActionsMenu.width
|
||||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -57,6 +58,7 @@ Row {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: contactContextMenu
|
id: contactContextMenu
|
||||||
hasArrow: false
|
hasArrow: false
|
||||||
|
|
|
@ -2,10 +2,12 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
import QtQuick.Layouts 1.13
|
import QtQuick.Layouts 1.13
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupmenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
//% "Fetch Messages"
|
//% "Fetch Messages"
|
||||||
title: qsTrId("fetch-messages")
|
title: qsTrId("fetch-messages")
|
||||||
|
|
|
@ -344,6 +344,7 @@ ModalPopup {
|
||||||
contextMenu.popup(-contextMenu.width / 2 + moreActionsBtn.width / 2, moreActionsBtn.height + 10)
|
contextMenu.popup(-contextMenu.width / 2 + moreActionsBtn.width / 2, moreActionsBtn.height + 10)
|
||||||
}
|
}
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: contextMenu
|
id: contextMenu
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import StatusQ.Popups 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
import "./"
|
import "./"
|
||||||
|
|
||||||
|
@ -168,6 +169,7 @@ StatusPopupMenu {
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: copyLinkMenu
|
id: copyLinkMenu
|
||||||
//% "Copy link"
|
//% "Copy link"
|
||||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -94,6 +95,7 @@ Rectangle {
|
||||||
contactContextMenu.popup()
|
contactContextMenu.popup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: contactContextMenu
|
id: contactContextMenu
|
||||||
hasArrow: false
|
hasArrow: false
|
||||||
|
|
|
@ -5,6 +5,7 @@ import QtQuick.Layouts 1.13
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -92,6 +93,7 @@ Item {
|
||||||
onExited: {
|
onExited: {
|
||||||
tokenContainer.hovered = false
|
tokenContainer.hovered = false
|
||||||
}
|
}
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: contextMenu
|
id: contextMenu
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import QtQuick.Layouts 1.13
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
import "../popups"
|
import "../popups"
|
||||||
import "../controls"
|
import "../controls"
|
||||||
|
@ -156,6 +157,7 @@ Item {
|
||||||
anchors.left: receiveBtn.right
|
anchors.left: receiveBtn.right
|
||||||
anchors.leftMargin: walletMenu.btnOuterMargin
|
anchors.leftMargin: walletMenu.btnOuterMargin
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: newSettingsMenu
|
id: newSettingsMenu
|
||||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
|
|
|
@ -2,9 +2,11 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
|
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: newAccountMenu
|
id: newAccountMenu
|
||||||
width: 260
|
width: 260
|
||||||
|
|
|
@ -2,6 +2,7 @@ import QtQuick 2.13
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/popups"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
@ -27,6 +28,7 @@ StatusFlatButton {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: newAccountMenu
|
id: newAccountMenu
|
||||||
width: 260
|
width: 260
|
||||||
|
|
|
@ -14,6 +14,7 @@ import DotherSide 0.1
|
||||||
import "./app/AppLayouts/Onboarding/views"
|
import "./app/AppLayouts/Onboarding/views"
|
||||||
import "./app"
|
import "./app"
|
||||||
import "./shared"
|
import "./shared"
|
||||||
|
import "./shared/panels"
|
||||||
import "./shared/popups"
|
import "./shared/popups"
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,9 @@ import QtQml.Models 2.3
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "status"
|
import "status"
|
||||||
import "./"
|
import "./"
|
||||||
|
import "./popups"
|
||||||
|
|
||||||
|
// TODO: replace with StatusPopupMenu
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
id: root
|
id: root
|
||||||
width: profileHeader.width
|
width: profileHeader.width
|
||||||
|
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.13
|
||||||
import QtGraphicalEffects 1.13
|
import QtGraphicalEffects 1.13
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../shared"
|
import "../"
|
||||||
|
|
||||||
Menu {
|
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
|
// 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
|
StyledButton 1.0 StyledButton.qml
|
||||||
RoundedIcon 1.0 RoundedIcon.qml
|
RoundedIcon 1.0 RoundedIcon.qml
|
||||||
PopupMenu 1.0 PopupMenu.qml
|
|
||||||
Separator 1.0 Separator.qml
|
Separator 1.0 Separator.qml
|
||||||
StatusTabButton 1.0 StatusTabButton.qml
|
StatusTabButton 1.0 StatusTabButton.qml
|
||||||
TextWithLabel 1.0 TextWithLabel.qml
|
TextWithLabel 1.0 TextWithLabel.qml
|
||||||
|
|
Loading…
Reference in New Issue