Added tox-style videoButton
68
ui/videoButton/videoButton.css
Normal 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;
|
||||||
|
}
|
||||||
|
|
BIN
ui/videoButton/videoButton.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
ui/videoButton/videoButton.xcf
Normal file
BIN
ui/videoButton/videoButtonDisabled.png
Normal file
After Width: | Height: | Size: 597 B |
BIN
ui/videoButton/videoButtonHover.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
ui/videoButton/videoButtonPressed.png
Normal file
After Width: | Height: | Size: 617 B |
BIN
ui/videoButton/videoButtonRed.png
Normal file
After Width: | Height: | Size: 571 B |
BIN
ui/videoButton/videoButtonRedHover.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
ui/videoButton/videoButtonRedPressed.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
ui/videoButton/videoButtonYellow.png
Normal file
After Width: | Height: | Size: 577 B |
BIN
ui/videoButton/videoButtonYellowHover.png
Normal file
After Width: | Height: | Size: 573 B |
BIN
ui/videoButton/videoButtonYellowPressed.png
Normal file
After Width: | Height: | Size: 572 B |
@ -18,7 +18,7 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||||||
headTextLayout = new QVBoxLayout(), mainLayout = new QVBoxLayout(), footButtonsSmall = new QVBoxLayout();
|
headTextLayout = new QVBoxLayout(), mainLayout = new QVBoxLayout(), footButtonsSmall = new QVBoxLayout();
|
||||||
mainChatLayout = new QGridLayout();
|
mainChatLayout = new QGridLayout();
|
||||||
msgEdit = new ChatTextEdit();
|
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();
|
chatArea = new QScrollArea();
|
||||||
|
|
||||||
QFont bold;
|
QFont bold;
|
||||||
@ -89,7 +89,17 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||||||
callButton->setObjectName("green");
|
callButton->setObjectName("green");
|
||||||
callButton->setStyleSheet(callButtonStylesheet);
|
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);
|
main->setLayout(mainLayout);
|
||||||
mainLayout->addWidget(chatArea);
|
mainLayout->addWidget(chatArea);
|
||||||
@ -110,6 +120,7 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||||||
headLayout->addLayout(headTextLayout);
|
headLayout->addLayout(headTextLayout);
|
||||||
headLayout->addStretch();
|
headLayout->addStretch();
|
||||||
headLayout->addWidget(callButton);
|
headLayout->addWidget(callButton);
|
||||||
|
headLayout->addWidget(videoButton);
|
||||||
|
|
||||||
headTextLayout->addStretch();
|
headTextLayout->addStretch();
|
||||||
headTextLayout->addWidget(name);
|
headTextLayout->addWidget(name);
|
||||||
|
@ -72,7 +72,7 @@ private:
|
|||||||
QGridLayout *mainChatLayout;
|
QGridLayout *mainChatLayout;
|
||||||
QLabel *avatar, *name, *statusMessage;
|
QLabel *avatar, *name, *statusMessage;
|
||||||
ChatTextEdit *msgEdit;
|
ChatTextEdit *msgEdit;
|
||||||
QPushButton *sendButton, *fileButton, *emoteButton, *callButton;
|
QPushButton *sendButton, *fileButton, *emoteButton, *callButton, *videoButton;
|
||||||
QScrollArea *chatArea;
|
QScrollArea *chatArea;
|
||||||
QWidget *main, *head, *chatAreaWidget;
|
QWidget *main, *head, *chatAreaWidget;
|
||||||
QString previousName;
|
QString previousName;
|
||||||
|
@ -45,13 +45,17 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
|
|||||||
mainChatLayout->setColumnStretch(1,1);
|
mainChatLayout->setColumnStretch(1,1);
|
||||||
mainChatLayout->setHorizontalSpacing(10);
|
mainChatLayout->setHorizontalSpacing(10);
|
||||||
|
|
||||||
sendButton->setIcon(QIcon("img/button icons/sendmessage_2x.png"));
|
QString sendButtonStylesheet = "";
|
||||||
sendButton->setIconSize(QSize(32,32));
|
try
|
||||||
sendButton->setFlat(true);
|
{
|
||||||
QPalette pal;
|
QFile f("ui/sendButton/sendButton.css");
|
||||||
pal.setColor(QPalette::Button, QColor(107,194,96)); // Tox Green
|
f.open(QFile::ReadOnly | QFile::Text);
|
||||||
sendButton->setPalette(pal);
|
QTextStream sendButtonStylesheetStream(&f);
|
||||||
sendButton->setAutoFillBackground(true);
|
sendButtonStylesheet = sendButtonStylesheetStream.readAll();
|
||||||
|
}
|
||||||
|
catch (int e) {}
|
||||||
|
sendButton->setStyleSheet(sendButtonStylesheet);
|
||||||
|
|
||||||
msgEdit->setFixedHeight(50);
|
msgEdit->setFixedHeight(50);
|
||||||
sendButton->setFixedSize(50, 50);
|
sendButton->setFixedSize(50, 50);
|
||||||
|
|
||||||
|