uiux: channel list fixes

Also make use of `StatusRoundButton` over `IconButton` since that's deprecated.

Closes #1115
This commit is contained in:
Pascal Precht 2020-11-11 16:03:25 +01:00 committed by Iuri Matias
parent 6efd3daffb
commit 67face5b99
3 changed files with 11 additions and 7 deletions

View File

@ -2,15 +2,21 @@ 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/status"
import "../components" import "../components"
AddButton { StatusRoundButton {
id: btnAdd id: btnAdd
pressedIconRotation: 45
icon.name: "plusSign"
size: "medium"
width: 36 width: 36
height: 36 height: 36
onClicked: { onClicked: {
let x = btnAdd.iconImg.x + btnAdd.icon.width / 2 - newChatMenu.width / 2 btnAdd.state = "pressed"
newChatMenu.popup(x, btnAdd.icon.height + 10) let x = btnAdd.iconX + btnAdd.icon.width / 2 - newChatMenu.width / 2
newChatMenu.popup(x, btnAdd.icon.height + 14)
} }
PopupMenu { PopupMenu {
@ -40,7 +46,7 @@ AddButton {
onTriggered: publicChatPopup.open() onTriggered: publicChatPopup.open()
} }
onAboutToHide: { onAboutToHide: {
btnAdd.iconImg.state = "default" btnAdd.state = "default"
} }
} }
} }

View File

@ -27,8 +27,6 @@ ScrollView {
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
anchors.rightMargin: Style.current.padding
anchors.leftMargin: Style.current.padding
height: childrenRect.height height: childrenRect.height
ListView { ListView {

View File

@ -9,5 +9,5 @@ Input {
iconWidth: 17 iconWidth: 17
iconHeight: 17 iconHeight: 17
customHeight: 36 customHeight: 36
fontPixelSize: 12 fontPixelSize: 15
} }