refactor: get rid off `AddButton` and make use of `StatusRoundButton` instead
This commit is contained in:
parent
537ae7991b
commit
2aac433a3d
|
@ -3,6 +3,7 @@ import QtQuick.Controls 2.13
|
|||
import QtQuick.Layouts 1.13
|
||||
import "../../../../imports"
|
||||
import "../../../../shared"
|
||||
import "../../../../shared/status"
|
||||
import "../../Chat/components"
|
||||
import "./Contacts"
|
||||
|
||||
|
@ -26,12 +27,12 @@ Item {
|
|||
width: addButton.width + usernameText.width + Style.current.padding
|
||||
height: addButton.height
|
||||
|
||||
AddButton {
|
||||
|
||||
StatusRoundButton {
|
||||
id: addButton
|
||||
clickable: false
|
||||
icon.name: "plusSign"
|
||||
size: "medium"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 40
|
||||
height: 40
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick.Layouts 1.3
|
|||
import QtQuick.Controls 2.14
|
||||
import "../../../../../imports"
|
||||
import "../../../../../shared"
|
||||
import "../../../../../shared/status"
|
||||
import "../../../Chat/ChatColumn/MessageComponents"
|
||||
|
||||
Item {
|
||||
|
@ -127,12 +128,11 @@ Item {
|
|||
width: addButton.width + usernameText.width + Style.current.padding
|
||||
height: addButton.height
|
||||
|
||||
AddButton {
|
||||
StatusRoundButton {
|
||||
id: addButton
|
||||
clickable: false
|
||||
icon.name: "plusSign"
|
||||
size: "medium"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 40
|
||||
height: 40
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import "../../../../shared"
|
||||
import "../../../../shared/status"
|
||||
import "../../../../imports"
|
||||
|
||||
AddButton {
|
||||
StatusRoundButton {
|
||||
id: btnAdd
|
||||
icon.name: "plusSign"
|
||||
pressedIconRotation: 45
|
||||
size: "medium"
|
||||
width: 36
|
||||
height: 36
|
||||
|
||||
onClicked: {
|
||||
let x = btnAdd.iconImg.x + btnAdd.icon.width / 2 - newAccountMenu.width / 2
|
||||
btnAdd.state = "pressed"
|
||||
let x = btnAdd.iconX + btnAdd.icon.width / 2 - newAccountMenu.width / 2
|
||||
newAccountMenu.popup(x, btnAdd.icon.height + 10)
|
||||
}
|
||||
|
||||
|
@ -59,7 +67,7 @@ AddButton {
|
|||
}
|
||||
}
|
||||
onAboutToHide: {
|
||||
btnAdd.iconImg.state = "default"
|
||||
btnAdd.state = "default"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
import "../imports"
|
||||
import "./"
|
||||
|
||||
IconButton {
|
||||
id: iconButton
|
||||
iconName: "plusSign"
|
||||
}
|
Loading…
Reference in New Issue