mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
micButton and volButton were added to chatForm, but micButton for some
reason is blinking
This commit is contained in:
parent
fdfbd9b162
commit
ca9a9b79cb
2
res.qrc
2
res.qrc
|
@ -122,5 +122,7 @@
|
|||
<file>ui/micButton/micButtonDisabled.png</file>
|
||||
<file>ui/micButton/micButtonHover.png</file>
|
||||
<file>ui/micButton/micButtonPressed.png</file>
|
||||
<file>ui/micButton/micButton.css</file>
|
||||
<file>ui/volButton/volButton.css</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -26,9 +26,13 @@ QPushButton#red
|
|||
QPushButton#grey
|
||||
{
|
||||
background-color: transparent;
|
||||
background-image: url(":/ui/callButton/callButtonDisabled.png");
|
||||
background-image: url(":/ui/micButton/micButtonDisabled.png");
|
||||
background-repeat: none;
|
||||
border: none;
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
QPushButton:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -18,3 +18,6 @@ QPushButton#green:pressed
|
|||
background-image: url(":/ui/volButton/volButtonPressed.png");
|
||||
}
|
||||
|
||||
QPushButton:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -36,10 +36,13 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
main = new QWidget(), head = new QWidget(), chatAreaWidget = new QWidget();
|
||||
name = new QLabel(), avatar = new QLabel(), statusMessage = new QLabel();
|
||||
headLayout = new QHBoxLayout(), mainFootLayout = new QHBoxLayout();
|
||||
headTextLayout = new QVBoxLayout(), mainLayout = new QVBoxLayout(), footButtonsSmall = new QVBoxLayout();
|
||||
headTextLayout = new QVBoxLayout(), mainLayout = new QVBoxLayout(),
|
||||
footButtonsSmall = new QVBoxLayout(), volMicLayout = new QVBoxLayout();
|
||||
mainChatLayout = new QGridLayout();
|
||||
msgEdit = new ChatTextEdit();
|
||||
sendButton = new QPushButton(), fileButton = new QPushButton(), emoteButton = new QPushButton(), callButton = new QPushButton(), videoButton = new QPushButton();
|
||||
sendButton = new QPushButton(), fileButton = new QPushButton(), emoteButton = new QPushButton(),
|
||||
callButton = new QPushButton(), videoButton = new QPushButton(),
|
||||
volButton = new QPushButton(), micButton = new QPushButton();
|
||||
chatArea = new QScrollArea();
|
||||
netcam = new NetCamView();
|
||||
|
||||
|
@ -80,6 +83,30 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
videoButton->setObjectName("green");
|
||||
videoButton->setStyleSheet(Style::get(":/ui/videoButton/videoButton.css"));
|
||||
|
||||
QString volButtonStylesheet = "";
|
||||
try
|
||||
{
|
||||
QFile f(":/ui/volButton/volButton.css");
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream volButtonStylesheetStream(&f);
|
||||
volButtonStylesheet = volButtonStylesheetStream.readAll();
|
||||
}
|
||||
catch (int e) {}
|
||||
volButton->setObjectName("green");
|
||||
volButton->setStyleSheet(volButtonStylesheet);
|
||||
|
||||
QString micButtonStylesheet = "";
|
||||
try
|
||||
{
|
||||
QFile f(":/ui/micButton/micButton.css");
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream micButtonStylesheetStream(&f);
|
||||
micButtonStylesheet = micButtonStylesheetStream.readAll();
|
||||
}
|
||||
catch (int e) {}
|
||||
micButton->setObjectName("green");
|
||||
micButton->setStyleSheet(micButtonStylesheet);
|
||||
|
||||
main->setLayout(mainLayout);
|
||||
mainLayout->addWidget(chatArea);
|
||||
mainLayout->addLayout(mainFootLayout);
|
||||
|
@ -98,9 +125,13 @@ ChatForm::ChatForm(Friend* chatFriend)
|
|||
headLayout->addWidget(avatar);
|
||||
headLayout->addLayout(headTextLayout);
|
||||
headLayout->addStretch();
|
||||
headLayout->addLayout(volMicLayout);
|
||||
headLayout->addWidget(callButton);
|
||||
headLayout->addWidget(videoButton);
|
||||
|
||||
volMicLayout->addWidget(micButton);
|
||||
volMicLayout->addWidget(volButton);
|
||||
|
||||
headTextLayout->addStretch();
|
||||
headTextLayout->addWidget(name);
|
||||
headTextLayout->addWidget(statusMessage);
|
||||
|
|
|
@ -89,11 +89,11 @@ private slots:
|
|||
private:
|
||||
Friend* f;
|
||||
QHBoxLayout *headLayout, *mainFootLayout;
|
||||
QVBoxLayout *headTextLayout, *mainLayout, *footButtonsSmall;
|
||||
QVBoxLayout *headTextLayout, *mainLayout, *footButtonsSmall, *volMicLayout;
|
||||
QGridLayout *mainChatLayout;
|
||||
QLabel *avatar, *name, *statusMessage;
|
||||
ChatTextEdit *msgEdit;
|
||||
QPushButton *sendButton, *fileButton, *emoteButton, *callButton, *videoButton;
|
||||
QPushButton *sendButton, *fileButton, *emoteButton, *callButton, *videoButton, *volButton, *micButton;
|
||||
QScrollArea *chatArea;
|
||||
QWidget *main, *head, *chatAreaWidget;
|
||||
QString previousName;
|
||||
|
|
Loading…
Reference in New Issue
Block a user