1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Added tox-style videoButton

This commit is contained in:
Flynn 2014-06-27 23:05:31 -07:00
parent c31c695482
commit 2621ce4ef7
15 changed files with 93 additions and 10 deletions

View File

@ -0,0 +1,68 @@
QPushButton#green
{
background-color: transparent;
background-image: url("ui/videoButton/videoButton.png");
background-repeat: none;
border: none;
width: 50px;
height: 40px;
}
QPushButton#green:hover
{
background-image: url("ui/videoButton/videoButtonHover.png");
}
QPushButton#green:pressed
{
background-image: url("ui/videoButton/videoButtonPressed.png");
}
QPushButton#red
{
background-color: transparent;
background-image: url("ui/videoButton/videoButtonRed.png");
background-repeat: none;
border: none;
width: 50px;
height: 40px;
}
QPushButton#red:hover
{
background-image: url("ui/videoButton/videoButtonRedHover.png");
}
QPushButton#red:pressed
{
background-image: url("ui/videoButton/videoButtonRedPressed.png");
}
QPushButton#yellow
{
background-color: transparent;
background-image: url("ui/videoButton/videoButtonYellow.png");
background-repeat: none;
border: none;
width: 50px;
height: 40px;
}
QPushButton#yellow:hover
{
background-image: url("ui/videoButton/videoButtonYellowHover.png");
}
QPushButton#yellow:pressed
{
background-image: url("ui/videoButton/videoButtonYellowPressed.png");
}
QPushButton#grey
{
background-color: transparent;
background-image: url("ui/videoButton/videoButtonDisabled.png");
background-repeat: none;
border: none;
width: 50px;
height: 40px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

View File

@ -18,7 +18,7 @@ ChatForm::ChatForm(Friend* chatFriend)
headTextLayout = new QVBoxLayout(), mainLayout = new QVBoxLayout(), footButtonsSmall = new QVBoxLayout();
mainChatLayout = new QGridLayout();
msgEdit = new ChatTextEdit();
sendButton = new QPushButton(), fileButton = new QPushButton(), emoteButton = new QPushButton(), callButton = new QPushButton();
sendButton = new QPushButton(), fileButton = new QPushButton(), emoteButton = new QPushButton(), callButton = new QPushButton(), videoButton = new QPushButton();
chatArea = new QScrollArea();
QFont bold;
@ -89,7 +89,17 @@ ChatForm::ChatForm(Friend* chatFriend)
callButton->setObjectName("green");
callButton->setStyleSheet(callButtonStylesheet);
QString videoButtonStylesheet = "";
try
{
QFile f("ui/videoButton/videoButton.css");
f.open(QFile::ReadOnly | QFile::Text);
QTextStream videoButtonStylesheetStream(&f);
videoButtonStylesheet = videoButtonStylesheetStream.readAll();
}
catch (int e) {}
videoButton->setObjectName("green");
videoButton->setStyleSheet(videoButtonStylesheet);
main->setLayout(mainLayout);
mainLayout->addWidget(chatArea);
@ -110,6 +120,7 @@ ChatForm::ChatForm(Friend* chatFriend)
headLayout->addLayout(headTextLayout);
headLayout->addStretch();
headLayout->addWidget(callButton);
headLayout->addWidget(videoButton);
headTextLayout->addStretch();
headTextLayout->addWidget(name);

View File

@ -72,7 +72,7 @@ private:
QGridLayout *mainChatLayout;
QLabel *avatar, *name, *statusMessage;
ChatTextEdit *msgEdit;
QPushButton *sendButton, *fileButton, *emoteButton, *callButton;
QPushButton *sendButton, *fileButton, *emoteButton, *callButton, *videoButton;
QScrollArea *chatArea;
QWidget *main, *head, *chatAreaWidget;
QString previousName;

View File

@ -45,13 +45,17 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
mainChatLayout->setColumnStretch(1,1);
mainChatLayout->setHorizontalSpacing(10);
sendButton->setIcon(QIcon("img/button icons/sendmessage_2x.png"));
sendButton->setIconSize(QSize(32,32));
sendButton->setFlat(true);
QPalette pal;
pal.setColor(QPalette::Button, QColor(107,194,96)); // Tox Green
sendButton->setPalette(pal);
sendButton->setAutoFillBackground(true);
QString sendButtonStylesheet = "";
try
{
QFile f("ui/sendButton/sendButton.css");
f.open(QFile::ReadOnly | QFile::Text);
QTextStream sendButtonStylesheetStream(&f);
sendButtonStylesheet = sendButtonStylesheetStream.readAll();
}
catch (int e) {}
sendButton->setStyleSheet(sendButtonStylesheet);
msgEdit->setFixedHeight(50);
sendButton->setFixedSize(50, 50);