Merge branch 'qml_app_style_buttons' into qml_app_ui_improvements

This commit is contained in:
Angela Mazzurco 2017-07-22 17:32:04 +02:00
commit 1ee655978c
6 changed files with 20 additions and 15 deletions

View file

@ -144,7 +144,7 @@ Item
border.color: inferiorPanel.styles.borderColor border.color: inferiorPanel.styles.borderColor
} }
BtnIcon ButtonIcon
{ {
id: attachButton id: attachButton
@ -263,7 +263,7 @@ Item
} }
} }
BtnIcon ButtonIcon
{ {
id: emojiButton id: emojiButton
@ -290,7 +290,7 @@ Item
} }
BtnIcon ButtonIcon
{ {
id: sendButton id: sendButton

View file

@ -4,7 +4,7 @@ import QtQuick.Controls 2.0
Item Item
{ {
id: button id: button
property alias buttonText: innerText.text; property alias text: innerText.text;
property alias buttonTextPixelSize: innerText.font.pixelSize property alias buttonTextPixelSize: innerText.font.pixelSize
property alias innerAnchors: innerElements.anchors; property alias innerAnchors: innerElements.anchors;
property alias rectangleButton: rectangleButton; property alias rectangleButton: rectangleButton;
@ -12,14 +12,17 @@ Item
property var iconUrl property var iconUrl
property int iconHeight: 20 property int iconHeight: 20
property color color property color color: "lightsteelblue"
property color hoverColor property color hoverColor: color
property color pressColor property color pressColor: color
property int fontSize property int fontSize
property int borderWidth property int borderWidth
property int borderRadius property int borderRadius: 3
property int innerMargin: 10 property int innerMargin: 10
height: innerText.height + innerMargin + innerMargin
width: innerText.width + innerMargin + innerMargin + icon.width + icon.width
scale: state === "Pressed" ? 0.96 : 1.0 scale: state === "Pressed" ? 0.96 : 1.0
onEnabledChanged: state = "" onEnabledChanged: state = ""
signal clicked signal clicked
@ -29,7 +32,7 @@ Item
id: rectangleButton id: rectangleButton
anchors.fill: parent anchors.fill: parent
radius: borderRadius radius: borderRadius
color: button.enabled ? button.color : "grey" color: button.enabled ? button.color : "lavender"
border.width: borderWidth border.width: borderWidth
border.color: "black" border.color: "black"
@ -59,6 +62,7 @@ Item
font.pointSize: fontSize font.pointSize: fontSize
anchors.left: icon.right anchors.left: icon.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: button.enabled ? "black" : "grey"
} }
} }
} }

View file

@ -111,9 +111,9 @@ Drawer
} }
} }
Btn ButtonText
{ {
buttonText: model.title text: model.title
width: parent.width width: parent.width
height: parent.height height: parent.height
color: menuItem.styles.defaultColor color: menuItem.styles.defaultColor
@ -123,6 +123,7 @@ Drawer
iconUrl: (model.icon)? model.icon : undefined iconUrl: (model.icon)? model.icon : undefined
innerMargin: 20 innerMargin: 20
buttonTextPixelSize: menuItem.styles.pixelSize buttonTextPixelSize: menuItem.styles.pixelSize
borderRadius: 0
} }

View file

@ -153,7 +153,7 @@ ApplicationWindow
} }
BtnIcon ButtonIcon
{ {
property bool searchIconVisibility: false property bool searchIconVisibility: false
property var onClickCB: function (){} property var onClickCB: function (){}
@ -190,7 +190,7 @@ ApplicationWindow
Component Component
{ {
id: rsIcon id: rsIcon
BtnIcon ButtonIcon
{ {
height: imageLoader.height height: imageLoader.height
width: imageLoader.height width: imageLoader.height

View file

@ -31,7 +31,7 @@
<file>ChatBubbleDelegate.qml</file> <file>ChatBubbleDelegate.qml</file>
<file>icons/send-message.svg</file> <file>icons/send-message.svg</file>
<file>icons/attach.svg</file> <file>icons/attach.svg</file>
<file>components/BtnIcon.qml</file> <file>components/ButtonIcon.qml</file>
<file>icons/smiley.svg</file> <file>icons/smiley.svg</file>
<file>icons/microphone_mute.svg</file> <file>icons/microphone_mute.svg</file>
<file>icons/microphone.svg</file> <file>icons/microphone.svg</file>
@ -40,7 +40,7 @@
<file>components/AvatarOrColorHash.qml</file> <file>components/AvatarOrColorHash.qml</file>
<file>components/SideBar.qml</file> <file>components/SideBar.qml</file>
<file>styles/SideBarStyle.qml</file> <file>styles/SideBarStyle.qml</file>
<file>components/Btn.qml</file> <file>components/ButtonText.qml</file>
<file>icons/netgraph.svg</file> <file>icons/netgraph.svg</file>
<file>icons/search.svg</file> <file>icons/search.svg</file>
<file>icons/exit.svg</file> <file>icons/exit.svg</file>