Skip to content
Snippets Groups Projects
Commit aa04677c authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Sébastien Blin
Browse files

mainview: ui fixes

1. GeneralMenuSeparator style
2. MessageBarTextArea style
3. SidePanelTabBar clickable area
4. SmartListItemDelegate CallStatus text position
5. ParticipantCallInStatus button/text size

Change-Id: I9f974783e100a2ed3bf0d30353e071230b211167
parent 5b267c9a
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ ComboBox {
contentItem: JamiListView {
id: listView
implicitHeight: popup.contentHeight
implicitHeight: contentHeight
model: root.delegateModel
}
......
......@@ -36,4 +36,8 @@ MenuSeparator {
implicitHeight: separatorPreferredHeight
color: separatorColor
}
background: Rectangle {
color: JamiTheme.backgroundColor
}
}
......@@ -240,7 +240,7 @@ Item {
property real participantCallInStatusOpacity: 0.77
property int participantCallInAvatarSize: 60
property int participantCallInNameFontSize: 11
property int participantCallInStatusFontSize: 7
property int participantCallInStatusFontSize: 8
property int participantCallInStatusTextWidthLimit: 80
property int participantCallInStatusTextWidth: 40
property int mosaicButtonRadius: 5
......
......@@ -28,7 +28,6 @@ import "../../commoncomponents"
TabButton {
id: root
property var tabBar: undefined
property alias labelText: label.text
property alias acceleratorSequence: accelerator.sequence
property alias badgeCount: badge.count
......@@ -37,18 +36,18 @@ TabButton {
hoverEnabled: true
onClicked: selected()
Rectangle {
id: rect
Rectangle {
id: contentRect
anchors.fill: root
width: tabBar.width / 2 + 1
height: tabBar.height
color: root.hovered ?
JamiTheme.hoverColor :
JamiTheme.backgroundColor
RowLayout {
anchors.horizontalCenter: rect.horizontalCenter
anchors.verticalCenter: rect.verticalCenter
anchors.horizontalCenter: contentRect.horizontalCenter
anchors.verticalCenter: contentRect.verticalCenter
Text {
id: label
......@@ -70,8 +69,8 @@ TabButton {
}
Rectangle {
width: rect.width
anchors.bottom: rect.bottom
width: contentRect.width
anchors.bottom: contentRect.bottom
height: 2
color: root.down ? JamiTheme.textColor : "transparent"
}
......@@ -79,7 +78,7 @@ TabButton {
Shortcut {
id: accelerator
context: Qt.ApplicationShortcut
enabled: rect.visible
enabled: contentRect.visible
onActivated: selected()
}
}
......@@ -57,23 +57,16 @@ JamiFlickable {
}
}
contentWidth: width
contentHeight: textArea.implicitHeight
interactive: true
attachedFlickableMoving: contentHeight > height || root.moving
function ensureVisible(r) {
if (contentY >= r.y)
contentY = r.y
else if (contentY + height <= r.y + r.height)
contentY = r.y + r.height - height
}
TextArea.flickable: TextArea {
id: textArea
padding: 0
leftPadding: JamiTheme.scrollBarHandleSize
rightPadding: JamiTheme.scrollBarHandleSize
topPadding: 0
bottomPadding: 0
verticalAlignment: TextEdit.AlignVCenter
......@@ -81,7 +74,6 @@ JamiFlickable {
font.hintingPreference: Font.PreferNoHinting
color: JamiTheme.textColor
renderType: Text.NativeRendering
wrapMode: TextEdit.Wrap
selectByMouse: true
selectionColor: JamiTheme.placeholderTextColor
......@@ -109,13 +101,14 @@ JamiFlickable {
}
}
}
background: Rectangle {
border.width: 0
color: JamiTheme.transparentColor
}
onReleased: function (event) {
if (event.button == Qt.RightButton)
if (event.button === Qt.RightButton)
textAreaContextMenu.openMenuAt(event)
}
......@@ -142,7 +135,5 @@ JamiFlickable {
}
}
}
onCursorRectangleChanged: root.ensureVisible(cursorRectangle)
}
}
......@@ -120,10 +120,7 @@ SpinningAnimation {
anchors.rightMargin: 10
anchors.verticalCenter: contentRect.verticalCenter
width: 40
height: 40
// To control the size of the svg
preferredSize: 50
preferredSize: 40
pressedColor: JamiTheme.refuseRed
hoveredColor: JamiTheme.refuseRed
......
......@@ -94,6 +94,7 @@ Rectangle {
anchors.topMargin: visible ? 10 : 0
width: sidePanelRect.width
height: visible ? 42 : 0
contentHeight: visible ? 42 : 0
}
Rectangle {
......@@ -145,7 +146,7 @@ Rectangle {
id: searchResultsListView
visible: count
opacity: visible ? 1 :0
opacity: visible ? 1 : 0
Layout.topMargin: 10
Layout.alignment: Qt.AlignTop
......
......@@ -28,8 +28,6 @@ import "../../commoncomponents"
TabBar {
id: tabBar
currentIndex: 0
enum TabIndex {
Conversations,
Requests
......@@ -39,11 +37,12 @@ TabBar {
ConversationsAdapter.filterRequests = (idx === SidePanelTabBar.Requests)
}
currentIndex: 0
FilterTabButton {
id: conversationsTabButton
down: !ConversationsAdapter.filterRequests
tabBar: parent
labelText: JamiStrings.conversations
onSelected: selectTab(SidePanelTabBar.Conversations)
badgeCount: ConversationsAdapter.totalUnreadMessageCount
......@@ -54,7 +53,6 @@ TabBar {
id: requestsTabButton
down: !conversationsTabButton.down
tabBar: parent
labelText: JamiStrings.invitations
onSelected: selectTab(SidePanelTabBar.Requests)
badgeCount: ConversationsAdapter.pendingRequestCount
......
......@@ -130,13 +130,13 @@ ItemDelegate {
}
ColumnLayout {
visible: (InCall || UnreadMessagesCount) && !ReadOnly
Layout.preferredWidth: childrenRect.width
Layout.fillHeight: true
spacing: 2
// call status
Text {
id: callStatusText
Layout.preferredHeight: 20
Layout.alignment: Qt.AlignRight
text: InCall ? UtilsAdapter.getCallStatusStr(CallState) : ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment