Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Patch wabutton #218

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
10 changes: 7 additions & 3 deletions src/client/UI/About/ImageTextLink.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ Button{
property string url;
height:img.height + 10
property bool inverted


platformStyle: ButtonStyle{inverted: root.inverted;}

platformStyle: ButtonStyle {
pressedTextColor: "lightgray"
inverted: root.inverted
pressedBackground: "image://theme/color3-meegotouch-button-accent-background"
checkedBackground: "image://theme/color3-meegotouch-button-background-selected-horizontal-normal"
}

Row{
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion src/client/UI/About/WASupport.qml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ WAPage {
horizontalAlignment: Text.AlignHCenter
}

Button{
WAButton{
anchors.horizontalCenter: parent.horizontalCenter
text:qsTr("Donate")
onClicked: {
Expand Down
6 changes: 2 additions & 4 deletions src/client/UI/ChangeStatus/ChangeStatus.qml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ WAPage {
color: "transparent"
clip: true

Button
WAButton
{
id:emoji_button
//platformStyle: ButtonStyle { inverted: true }
width:50
height:50
iconSource: "../common/images/emoji/32/emoji-E415.png"
Expand All @@ -97,10 +96,9 @@ WAPage {
}


Button
WAButton
{
id:send_button
platformStyle: ButtonStyle { inverted: true }
width:160
height:50
text: qsTr("Done")
Expand Down
72 changes: 26 additions & 46 deletions src/client/UI/Contacts/ContactProfile.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,32 +75,6 @@ WAPage {
}
}


ButtonStyle {
id: buttonStyleTop
property string __invertedString: theme.inverted ? "-inverted" : ""
pressedBackground: "image://theme/color3-meegotouch-button-background-pressed-vertical-top"
checkedBackground: "image://theme/color3-meegotouch-button-background-selected-vertical-top"
disabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-vertical-top"
checkedDisabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-selected-vertical-top"
}
ButtonStyle {
id: buttonStyleCenter
property string __invertedString: theme.inverted ? "-inverted" : ""
pressedBackground: "image://theme/color3-meegotouch-button-background-pressed-vertical-center"
checkedBackground: "image://theme/color3-meegotouch-button-background-selected-vertical-center"
disabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-vertical-center"
checkedDisabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-selected-vertical-center"
}
ButtonStyle {
id: buttonStyleBottom
property string __invertedString: theme.inverted ? "-inverted" : ""
pressedBackground: "image://theme/color3-meegotouch-button-background-pressed-vertical-bottom"
checkedBackground: "image://theme/color3-meegotouch-button-background-selected-vertical-bottom"
disabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-vertical-bottom"
checkedDisabledBackground: "image://theme/color3-meegotouch-button"+__invertedString+"-background-disabled-selected-vertical-bottom"
}

QueryDialog {
id: chatHistoryDelete
titleText: qsTr("Confirm Delete")
Expand Down Expand Up @@ -211,13 +185,17 @@ WAPage {
ButtonColumn{
id: buttonColumn
width: parent.width
anchors.left: parent.left
anchors.leftMargin: 16
anchors.right: parent.right
anchors.rightMargin: 16

Button {
WAButton {
id: statusButton
platformStyle: buttonStyleTop
height: 50
width: parent.width
font.pixelSize: 22
focusable: false
text: qsTr("Update status")
onClicked: {
updateSingleStatus=true //@@retarded
Expand All @@ -227,12 +205,12 @@ WAPage {
}
}

Button {
WAButton {
id: blockButton
platformStyle: buttonStyleCenter
height: 50
width: parent.width
font.pixelSize: 22
focusable: false
text: blockedContacts.indexOf(contactJid)==-1? qsTr("Ignore messages") : qsTr("Allow messages")
onClicked: {
if (blockedContacts.indexOf(contactJid)==-1)
Expand All @@ -242,32 +220,32 @@ WAPage {
}
}

Button {
WAButton {
height: 50
platformStyle: buttonStyleCenter
width: parent.width
font.pixelSize: 22
focusable: false
text: qsTr("Add to contacts")
visible: !inContacts
onClicked: Qt.openUrlExternally("tel:"+contactNumber)
}

Button {
WAButton {
id: sendChatButton
platformStyle: buttonStyleCenter
height: 50
width: parent.width
font.pixelSize: 22
focusable: false
text: qsTr("Send chat history")
onClicked: { exportConversation(contactJid); }
}

Button {
WAButton {
id: deleteChatButton
platformStyle: buttonStyleBottom
height: 50
width: parent.width
font.pixelSize: 22
focusable: false
text: qsTr("Delete chat history")
onClicked: {
chatHistoryDelete.open()
Expand All @@ -279,7 +257,7 @@ WAPage {
id: separator3
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 5
anchors.rightMargin: 16
height: conversationMediaModel.count>0? 36 : 0
title: qsTr("Media")
visible: conversationMediaModel.count>0
Expand Down Expand Up @@ -356,7 +334,7 @@ WAPage {
id: separator2
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 5
anchors.rightMargin: 16
visible: groupsRepeater.model.count==0 ? false : true
height: visible ? 36 : 0
title: qsTr("Groups")
Expand Down Expand Up @@ -438,35 +416,37 @@ WAPage {
id: separator1
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 5
anchors.rightMargin: 16
height: 50
title: qsTr("Phone")
}

Item {
id: telephonyItem
height: 84
width: parent.width
x: 0
width: parent.width - 32
x: 16

BorderImage {
height: 84
width: parent.width -80
width: parent.width - 80
x: 0; y: 0
source: "pics/buttons/button-left"+(theme.inverted?"-inverted":"")+(bArea.pressed? "-pressed" : "")+".png"
source: "image://theme/" + (bArea.pressed? "color3-" : "") + "meegotouch-button-" + (theme.inverted?"inverted-":"") + "background" + (bArea.pressed? "-pressed" : "") + "-horizontal-left"
border { left: 22; right: 22; bottom: 22; top: 22; }

Label {
x: 20; y: 14
width: parent.width
font.pixelSize: 20
color: (bArea.pressed?"lightgray":(theme.inverted?"white":"black"))
text: qsTr("Mobile phone")
}
Label {
x: 20; y: 40
width: parent.width
font.bold: true
font.pixelSize: 24
color: (bArea.pressed?"lightgray":(theme.inverted?"white":"black"))
text: "+"+contactNumber
}
MouseArea {
Expand All @@ -481,13 +461,13 @@ WAPage {
anchors.right: parent.right
width: 80
x: 0; y: 0
source: "pics/buttons/button-right"+(theme.inverted?"-inverted":"")+(bcArea.pressed? "-pressed" : "")+".png"
source: "image://theme/" + (bcArea.pressed? "color3-" : "") + "meegotouch-button-" + (theme.inverted?"inverted-":"") + "background" + (bcArea.pressed? "-pressed" : "") + "-horizontal-right"
border { left: 22; right: 22; bottom: 22; top: 22; }

Image {
x: 18
x: 16
anchors.verticalCenter: parent.verticalCenter
source: "image://theme/icon-m-toolbar-new-message"+(theme.inverted?"-white":"")
source: "image://theme/icon-m-toolbar-new-message"+(theme.inverted?"-white":"")+(bcArea.pressed? "-selected" : "")
}
MouseArea {
id: bcArea
Expand Down
26 changes: 15 additions & 11 deletions src/client/UI/Conversations/Conversation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -919,25 +919,30 @@ WAPage {
opacity: 0.4
}

Button
WAButton
{
id: emoji_button
//platformStyle: ButtonStyle { inverted: true }
width:50
height:50
iconSource: "../common/images/emoji/32/E415.png"
iconSource: "../common/images/emoji/32/E415.png"
anchors.left: parent.left
anchors.leftMargin: 16
anchors.leftMargin: 16
anchors.verticalCenter: send_button.verticalCenter
onClicked: {
onClicked: {
sendMediaWindow.opacity = 0
emojiDialog.openDialog(chat_text);
emojiDialog.openDialog(chat_text);
showSendButton=true;
//chat_text.lastPosition = chat_text.cursorPosition
//chat_text.lastPosition = chat_text.cursorPosition
}
onPressAndHold: {
sendMediaWindow.opacity = 0
emojiDialog.openLongDialog(chat_text);
showSendButton=true;
//chat_text.lastPosition = chat_text.cursorPosition
}
}

Button {
WAButton {
id: media_button
anchors.left: emoji_button.right
anchors.leftMargin: 12
Expand All @@ -954,10 +959,9 @@ WAPage {
}
}

Button
WAButton
{
id:send_button
platformStyle: ButtonStyle { inverted: true }
width:160
height:50
text: qsTr("Send")
Expand Down Expand Up @@ -1027,7 +1031,7 @@ WAPage {
width:conv_items.width
//height:visible?loadMoreButton.height+20:0;
height: Math.max(hasMore?60:0, conv_panel.height -conv_items.contentHeight -myTextArea.height)
Button{
WAButton{
visible: hasMore
height: 44
id:loadMoreButton
Expand Down
12 changes: 4 additions & 8 deletions src/client/UI/Conversations/SendAudioRec.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ WAPage {
anchors.bottomMargin: 20
spacing: 16

Button {
WAButton {
height: 72
width: 384
platformStyle: ButtonStyle { inverted: true }
iconSource: "images/rec.png"
enabled: !recording && !recorded
onClicked: {
Expand All @@ -86,21 +85,19 @@ WAPage {
Row {
spacing: 16

Button {
WAButton {
height: 72
width: 120
platformStyle: ButtonStyle { inverted: true }
iconSource: "images/play.png"
enabled: recorded
onClicked: {
playRecording()
}
}

Button {
WAButton {
height: 72
width: 120
platformStyle: ButtonStyle { inverted: true }
iconSource: "images/stop.png"
enabled: recording
onClicked: {
Expand All @@ -110,10 +107,9 @@ WAPage {
}
}

Button {
WAButton {
height: 72
width: 120
platformStyle: ButtonStyle { inverted: true }
iconSource: "images/delete.png"
enabled: recorded
onClicked: {
Expand Down
2 changes: 1 addition & 1 deletion src/client/UI/EmojiDialog/Components/Emoji.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Rectangle {

Rectangle {
anchors.fill: parent
color:mousearea.pressed ? "#218ade":"#3c3c3b"
color:mousearea.pressed ? "#27a01b":"#3c3c3b"
}
Image {
id:emojiImage
Expand Down
Loading