From d444375ea4eedccc26bb05eb30aaf75cf86c0666 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 25 Aug 2021 17:30:37 +0200 Subject: [PATCH] Change button design --- .../src/components/other/colors/ColorListModel.hpp | 8 +++++--- .../ui/modules/Common/Form/Buttons/ExclusiveButtons.qml | 1 + .../ui/modules/Common/Form/Buttons/SmallButton.qml | 3 +++ .../Common/Styles/Form/Buttons/ExclusiveButtonsStyle.qml | 2 +- .../Common/Styles/Form/Buttons/SmallButtonStyle.qml | 2 +- linphone-app/ui/views/App/Main/Conversation.qml | 4 +++- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp index 282079053..1701b3fbe 100644 --- a/linphone-app/src/components/other/colors/ColorListModel.hpp +++ b/linphone-app/src/components/other/colors/ColorListModel.hpp @@ -55,8 +55,8 @@ class ColorListModel : public QAbstractListModel { ADD_COLOR("c", "#CBCBCB", "Button pressed, separatos, fields.") ADD_COLOR("d", "#5A585B", "") ADD_COLOR("e", "#F3F3F3", "") - ADD_COLOR("f", "#E8E8E8", "") - ADD_COLOR("g", "#6B7A86", "SIP Address, Contact Text.") + ADD_COLOR("f", "#E8E8E8", "Border color") + ADD_COLOR("g", "#6B7A86", "SIP Address, Contact Text, Selected button.") ADD_COLOR("h", "#687680", "") // Primary color. @@ -72,7 +72,7 @@ class ColorListModel : public QAbstractListModel { // Primary color for clicked items. ADD_COLOR("m", "#FF8600", "Primary color for clicked items.") - ADD_COLOR("n", "#A1A1A1", "") + ADD_COLOR("n", "#A1A1A1", "Pressed button") ADD_COLOR("o", "#D0D8DE", "Disabled button") ADD_COLOR("p", "#17A81A", "Progress bar.") @@ -88,6 +88,8 @@ class ColorListModel : public QAbstractListModel { ADD_COLOR("v", "#E7E7E7", "Menu pressed (message)") ADD_COLOR("w", "#EDEDED", "Menu background (conversation)") + ADD_COLOR("x", "#D0D8DE", "Background unselected round button") + // Field error. ADD_COLOR("error", "#FF0000", "Error Generic button.") diff --git a/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml b/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml index 02313e8d8..216abae1f 100644 --- a/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml +++ b/linphone-app/ui/modules/Common/Form/Buttons/ExclusiveButtons.qml @@ -53,6 +53,7 @@ Row { ) ) text: modelData + radius: height/2 onClicked: { if (selectedButton !== index) { diff --git a/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml b/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml index 0c310de93..6d4fddf92 100644 --- a/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml +++ b/linphone-app/ui/modules/Common/Form/Buttons/SmallButton.qml @@ -10,6 +10,7 @@ Button { id: button property alias backgroundColor: background.color + property alias radius: background.radius background: Rectangle { id: background @@ -26,11 +27,13 @@ Button { contentItem: Text { color: SmallButtonStyle.text.color font.pointSize: SmallButtonStyle.text.pointSize + font.weight: Font.Bold horizontalAlignment: Text.AlignHCenter text: button.text verticalAlignment: Text.AlignVCenter leftPadding: SmallButtonStyle.leftPadding rightPadding: SmallButtonStyle.rightPadding + } hoverEnabled: true MouseArea { diff --git a/linphone-app/ui/modules/Common/Styles/Form/Buttons/ExclusiveButtonsStyle.qml b/linphone-app/ui/modules/Common/Styles/Form/Buttons/ExclusiveButtonsStyle.qml index 2090ef060..7b772870e 100644 --- a/linphone-app/ui/modules/Common/Styles/Form/Buttons/ExclusiveButtonsStyle.qml +++ b/linphone-app/ui/modules/Common/Styles/Form/Buttons/ExclusiveButtonsStyle.qml @@ -10,7 +10,7 @@ QtObject { property QtObject button: QtObject { property QtObject color: QtObject { property color hovered: Colors.n.color - property color normal: Colors.c.color + property color normal: Colors.x.color property color pressed: Colors.i.color property color selected: Colors.g.color } diff --git a/linphone-app/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml b/linphone-app/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml index bf73c286b..827a8efa4 100644 --- a/linphone-app/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml +++ b/linphone-app/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml @@ -11,7 +11,7 @@ QtObject { property QtObject background: QtObject { property int height: 22 - property int radius: 10 + property int radius: 20 property QtObject color: QtObject { property color hovered: Colors.c.color diff --git a/linphone-app/ui/views/App/Main/Conversation.qml b/linphone-app/ui/views/App/Main/Conversation.qml index 04509b9a9..7c75982e9 100644 --- a/linphone-app/ui/views/App/Main/Conversation.qml +++ b/linphone-app/ui/views/App/Main/Conversation.qml @@ -410,12 +410,14 @@ ColumnLayout { anchors.left : filterButtons.right anchors.rightMargin: 10 anchors.leftMargin: 80 + anchors.topMargin: 10 + anchors.bottomMargin: 10 TextField { id:searchBar anchors { fill: parent - margins: 7 + margins: 1 } width: parent.width-14 icon: 'search'