diff --git a/res.qrc b/res.qrc index d156fb9f2..ff43f881c 100644 --- a/res.qrc +++ b/res.qrc @@ -65,10 +65,7 @@ ui/fileTransferWidget/fileTransferWidget.css ui/friendList/friendList.css ui/micButton/micButton.css - ui/micButton/micButton.png - ui/micButton/micButtonDisabled.png - ui/micButton/micButtonHover.png - ui/micButton/micButtonPressed.png + ui/micButton/micButton.svg ui/msgEdit/msgEdit.css ui/sendButton/sendButton.css ui/sendButton/sendButton.svg @@ -78,10 +75,8 @@ ui/statusButton/menu_indicator.svg ui/videoButton/videoButton.css ui/videoButton/videoButton.svg - ui/volButton/volButton.png - ui/volButton/volButtonHover.png - ui/volButton/volButtonPressed.png ui/volButton/volButton.css + ui/volButton/volButton.svg ui/window/statusPanel.css ui/window/window.css ui/chatArea/info.svg @@ -97,7 +92,6 @@ ui/fileTransferInstance/filetransferWidget.css ui/acceptCall/acceptCall.svg ui/rejectCall/rejectCall.svg - ui/volButton/volButtonDisabled.png img/login_logo.svg ui/notificationEdge/notificationEdge.css ui/loginScreen/loginScreen.css diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 55d9de4d1..1bb2836e0 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -951,6 +951,11 @@ void ChatForm::updateMuteVolButton() volButton->setToolTip(tr("Mute call")); } } + else + { + volButton->setObjectName(""); + volButton->setToolTip(tr("Sound can be disabled only during a call")); + } volButton->setStyleSheet(Style::getStylesheet(QStringLiteral(":/ui/volButton/volButton.css"))); } diff --git a/ui/micButton/micButton.css b/ui/micButton/micButton.css index 0a01aae39..099208095 100644 --- a/ui/micButton/micButton.css +++ b/ui/micButton/micButton.css @@ -1,14 +1,15 @@ QAbstractButton { - background-color: transparent; - background-image: url(":/ui/micButton/micButton.png"); - background-repeat: none; + border-radius: 5px; border: none; + background-image: url(":/ui/micButton/micButton.svg"); + background-repeat: none; + background-position: center; } QAbstractButton:disabled { - background-image: url(":/ui/micButton/micButtonDisabled.png"); + background-color: #919191; } QAbstractButton:focus @@ -16,12 +17,47 @@ QAbstractButton:focus outline: none; } +QAbstractButton#green +{ + background-color: #6bc260; +} + QAbstractButton#green:hover { - background-image: url(":/ui/micButton/micButtonHover.png"); + background-color: #79c76f; +} + +QAbstractButton#green:pressed +{ + background-color: #51b244; } QAbstractButton#red { - background-image: url(":/ui/micButton/micButtonPressed.png"); + background-color: #c84e4e; +} + +QAbstractButton#red:hover +{ + background-color: #e87474; +} + +QAbstractButton#red:pressed +{ + background-color: #df3b3b; +} + +QAbstractButton#yellow +{ + background-color: #e6e465; +} + +QAbstractButton#yellow:hover +{ + background-color: #e8e774; +} + +QAbstractButton#yellow:pressed +{ + background-color: #e3e155; } diff --git a/ui/micButton/micButton.png b/ui/micButton/micButton.png deleted file mode 100644 index 04965b6f0..000000000 Binary files a/ui/micButton/micButton.png and /dev/null differ diff --git a/ui/micButton/micButton.svg b/ui/micButton/micButton.svg new file mode 100644 index 000000000..f89b0e514 --- /dev/null +++ b/ui/micButton/micButton.svg @@ -0,0 +1,89 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/ui/micButton/micButtonDisabled.png b/ui/micButton/micButtonDisabled.png deleted file mode 100644 index 5b94ddae7..000000000 Binary files a/ui/micButton/micButtonDisabled.png and /dev/null differ diff --git a/ui/micButton/micButtonHover.png b/ui/micButton/micButtonHover.png deleted file mode 100644 index bc92ceecd..000000000 Binary files a/ui/micButton/micButtonHover.png and /dev/null differ diff --git a/ui/micButton/micButtonPressed.png b/ui/micButton/micButtonPressed.png deleted file mode 100644 index a56e4a1be..000000000 Binary files a/ui/micButton/micButtonPressed.png and /dev/null differ diff --git a/ui/volButton/volButton.css b/ui/volButton/volButton.css index b537ee217..5203d998d 100644 --- a/ui/volButton/volButton.css +++ b/ui/volButton/volButton.css @@ -1,14 +1,15 @@ QAbstractButton { - background-color: transparent; - background-image: url(":/ui/volButton/volButton.png"); - background-repeat: none; + border-radius: 5px; border: none; + background-image: url(":/ui/volButton/volButton.svg"); + background-repeat: none; + background-position: center; } QAbstractButton:disabled { - background-image: url(":/ui/volButton/volButtonDisabled.png"); + background-color: #919191; } QAbstractButton:focus @@ -16,12 +17,47 @@ QAbstractButton:focus outline: none; } +QAbstractButton#green +{ + background-color: #6bc260; +} + QAbstractButton#green:hover { - background-image: url(":/ui/volButton/volButtonHover.png"); + background-color: #79c76f; +} + +QAbstractButton#green:pressed +{ + background-color: #51b244; } QAbstractButton#red { - background-image: url(":/ui/volButton/volButtonPressed.png"); + background-color: #c84e4e; +} + +QAbstractButton#red:hover +{ + background-color: #e87474; +} + +QAbstractButton#red:pressed +{ + background-color: #df3b3b; +} + +QAbstractButton#yellow +{ + background-color: #e6e465; +} + +QAbstractButton#yellow:hover +{ + background-color: #e8e774; +} + +QAbstractButton#yellow:pressed +{ + background-color: #e3e155; } diff --git a/ui/volButton/volButton.png b/ui/volButton/volButton.png deleted file mode 100644 index b07c13209..000000000 Binary files a/ui/volButton/volButton.png and /dev/null differ diff --git a/ui/volButton/volButton.svg b/ui/volButton/volButton.svg new file mode 100644 index 000000000..ff68bade9 --- /dev/null +++ b/ui/volButton/volButton.svg @@ -0,0 +1,79 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ui/volButton/volButtonDisabled.png b/ui/volButton/volButtonDisabled.png deleted file mode 100644 index 78862daab..000000000 Binary files a/ui/volButton/volButtonDisabled.png and /dev/null differ diff --git a/ui/volButton/volButtonHover.png b/ui/volButton/volButtonHover.png deleted file mode 100644 index 4a5e47d97..000000000 Binary files a/ui/volButton/volButtonHover.png and /dev/null differ diff --git a/ui/volButton/volButtonPressed.png b/ui/volButton/volButtonPressed.png deleted file mode 100644 index c2379c1c9..000000000 Binary files a/ui/volButton/volButtonPressed.png and /dev/null differ