Skip to content

Commit

Permalink
Fix padding and sizing of call notification window
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
  • Loading branch information
claucambra committed Apr 21, 2022
1 parent cdad959 commit 062a65a
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/gui/tray/CallNotificationDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ Window {
color: "transparent"
flags: Qt.Dialog | Qt.FramelessWindowHint

readonly property int windowMargins: 50
readonly property int windowSpacing: 10
readonly property int windowWidth: 240
readonly property int windowHeight: 160

readonly property string svgImage: "image://svgimage-custom-color/%1.svg" + "/"
readonly property string talkIcon: svgImage.arg("wizard-talk")
Expand All @@ -34,7 +33,7 @@ Window {
}

width: root.windowWidth
height: root.windowHeight
height: rootBackground.height

Component.onCompleted: {
Systray.forceWindowInit(root);
Expand All @@ -55,7 +54,8 @@ Window {

Rectangle {
id: rootBackground
anchors.fill: parent
width: parent.width
height: contentLayout.height + (root.windowSpacing * 2)
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
color: Style.backgroundColor
border.width: Style.trayWindowBorderWidth
Expand Down Expand Up @@ -116,8 +116,12 @@ Window {
}

ColumnLayout {
anchors.centerIn: parent
spacing: 10
id: contentLayout
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: root.windowSpacing
spacing: root.windowSpacing

Item {
width: Style.accountAvatarSize
Expand Down Expand Up @@ -162,12 +166,15 @@ Window {
text: root.subject
color: root.usingUserAvatar ? "white" : Style.ncTextColor
font.pixelSize: Style.topLinePixelSize
elide: Text.ElideRight
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Layout.fillWidth: true
}

Row {
spacing: 5
RowLayout {
spacing: root.windowSpacing / 2
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter

Repeater {
Expand Down

0 comments on commit 062a65a

Please sign in to comment.