mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
style(widget): Style fixes
This commit is contained in:
parent
88eca7e200
commit
76f694fe73
2
res.qrc
2
res.qrc
|
@ -131,5 +131,7 @@
|
|||
<file>ui/loginScreen/loginScreen.css</file>
|
||||
<file>img/others/logout-icon.svg</file>
|
||||
<file>img/caps_lock.svg</file>
|
||||
<file>ui/contentDialog/contentDialog.css</file>
|
||||
<file>ui/tooliconsZone/tooliconsZone.css</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -254,11 +254,9 @@ void CategoryWidget::onCompactChanged(bool _compact)
|
|||
topLayout->setSpacing(0);
|
||||
topLayout->setMargin(0);
|
||||
|
||||
(void)_compact;
|
||||
Q_UNUSED(_compact);
|
||||
setCompact(true);
|
||||
|
||||
if (true)
|
||||
{
|
||||
nameLabel->minimizeMaximumWidth();
|
||||
|
||||
mainLayout = nullptr;
|
||||
|
@ -275,31 +273,6 @@ void CategoryWidget::onCompactChanged(bool _compact)
|
|||
topLayout->addWidget(statusLabel);
|
||||
topLayout->addSpacing(5);
|
||||
topLayout->activate();
|
||||
}
|
||||
/*else
|
||||
{
|
||||
nameLabel->setMaximumWidth(QWIDGETSIZE_MAX);
|
||||
|
||||
mainLayout = new QVBoxLayout();
|
||||
mainLayout->setSpacing(0);
|
||||
mainLayout->setContentsMargins(20, 0, 20, 0);
|
||||
|
||||
container->setFixedHeight(25);
|
||||
container->setLayout(mainLayout);
|
||||
|
||||
topLayout->addWidget(&statusPic);
|
||||
topLayout->addSpacing(10);
|
||||
topLayout->addWidget(nameLabel, 1);
|
||||
topLayout->addSpacing(5);
|
||||
topLayout->addWidget(statusLabel);
|
||||
topLayout->activate();
|
||||
|
||||
mainLayout->addStretch();
|
||||
mainLayout->addLayout(topLayout);
|
||||
mainLayout->addWidget(lineFrame);
|
||||
mainLayout->addStretch();
|
||||
mainLayout->activate();
|
||||
}*/
|
||||
|
||||
Style::repolish(this);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ ContentDialog::ContentDialog(SettingsWidget* settingsWidget, QWidget* parent)
|
|||
boxLayout->setSpacing(0);
|
||||
|
||||
splitter = new QSplitter(this);
|
||||
setStyleSheet("QSplitter{color: rgb(255, 255, 255);background-color: rgb(255, 255, 255);alternate-background-color: rgb(255, 255, 255);border-color: rgb(255, 255, 255);gridline-color: rgb(255, 255, 255);selection-color: rgb(255, 255, 255);selection-background-color: rgb(255, 255, 255);}QSplitter:handle{color: rgb(255, 255, 255);background-color: rgb(255, 255, 255);}");
|
||||
setStyleSheet(Style::getStylesheet(":/ui/contentDialog/contentDialog.css"));
|
||||
splitter->setHandleWidth(6);
|
||||
|
||||
QWidget *friendWidget = new QWidget();
|
||||
|
|
|
@ -137,9 +137,8 @@ bool AddFriendForm::addFriendRequest(const QString &friendAddress, const QString
|
|||
{
|
||||
addFriendRequestWidget(friendAddress, message);
|
||||
if (isShown())
|
||||
{
|
||||
onCurrentChanged(tabWidget->currentIndex());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -203,7 +202,8 @@ void AddFriendForm::onIdChanged(const QString &id)
|
|||
QStringLiteral(" (") +
|
||||
toxIdComment +
|
||||
QStringLiteral(")"));
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
toxIdLabel.setText(toxIdText +
|
||||
QStringLiteral(" <font color='red'>(") +
|
||||
|
|
|
@ -580,7 +580,7 @@ void ChatForm::onEnableCallButtons()
|
|||
|
||||
void ChatForm::onMicMuteToggle()
|
||||
{
|
||||
if (audioInputFlag == true)
|
||||
if (audioInputFlag)
|
||||
{
|
||||
coreav->micMuteToggle(f->getFriendID());
|
||||
if (micButton->objectName() == "red")
|
||||
|
@ -600,7 +600,7 @@ void ChatForm::onMicMuteToggle()
|
|||
|
||||
void ChatForm::onVolMuteToggle()
|
||||
{
|
||||
if (audioOutputFlag == true)
|
||||
if (audioOutputFlag)
|
||||
{
|
||||
coreav->volMuteToggle(f->getFriendID());
|
||||
if (volButton->objectName() == "red")
|
||||
|
|
|
@ -92,6 +92,12 @@ private slots:
|
|||
private:
|
||||
void retranslateUi();
|
||||
void showOutgoingCall(bool video);
|
||||
void startCounter();
|
||||
void stopCounter();
|
||||
QString secondsToDHMS(quint32 duration);
|
||||
void enableCallButtons();
|
||||
void disableCallButtons();
|
||||
void SendMessageStr(QString msg);
|
||||
|
||||
protected:
|
||||
virtual GenericNetCamView* createNetcam() final override;
|
||||
|
@ -117,14 +123,8 @@ private:
|
|||
|
||||
ScreenshotGrabber* screenshotGrabber;
|
||||
QHash<uint, FileTransferInstance*> ftransWidgets;
|
||||
void startCounter();
|
||||
void stopCounter();
|
||||
QString secondsToDHMS(quint32 duration);
|
||||
CallConfirmWidget *callConfirm;
|
||||
void enableCallButtons();
|
||||
void disableCallButtons();
|
||||
bool isTyping;
|
||||
void SendMessageStr(QString msg);
|
||||
};
|
||||
|
||||
#endif // CHATFORM_H
|
||||
|
|
|
@ -470,18 +470,14 @@ QString GenericChatForm::resolveToxId(const ToxId &id)
|
|||
{
|
||||
Friend *f = FriendList::findFriend(id);
|
||||
if (f)
|
||||
{
|
||||
return f->getDisplayedName();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto it : GroupList::getAllGroups())
|
||||
|
||||
for (Group *it : GroupList::getAllGroups())
|
||||
{
|
||||
QString res = it->resolveToxId(id);
|
||||
if (res.size())
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ void GroupChatForm::dropEvent(QDropEvent *ev)
|
|||
|
||||
void GroupChatForm::onMicMuteToggle()
|
||||
{
|
||||
if (audioInputFlag == true)
|
||||
if (audioInputFlag)
|
||||
{
|
||||
if (micButton->objectName() == "red")
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ void GroupChatForm::onMicMuteToggle()
|
|||
|
||||
void GroupChatForm::onVolMuteToggle()
|
||||
{
|
||||
if (audioOutputFlag == true)
|
||||
if (audioOutputFlag)
|
||||
{
|
||||
if (volButton->objectName() == "red")
|
||||
{
|
||||
|
|
|
@ -187,9 +187,8 @@ void GroupInviteForm::retranslateUi()
|
|||
{
|
||||
headLabel->setText(tr("Groups"));
|
||||
if (createButton)
|
||||
{
|
||||
createButton->setText(tr("Create new group"));
|
||||
}
|
||||
|
||||
inviteBox->setTitle(tr("Group invites"));
|
||||
|
||||
for (QPushButton* acceptButton : acceptButtons)
|
||||
|
|
|
@ -45,7 +45,10 @@ signals:
|
|||
void clicked();
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QMouseEvent*) final override {emit clicked();}
|
||||
virtual void mouseReleaseEvent(QMouseEvent*) final override
|
||||
{
|
||||
emit clicked();
|
||||
}
|
||||
};
|
||||
|
||||
class ProfileForm : public QWidget
|
||||
|
|
|
@ -35,7 +35,10 @@ class AboutForm : public GenericForm
|
|||
public:
|
||||
AboutForm();
|
||||
~AboutForm();
|
||||
virtual QString getFormName() final override {return tr("About");}
|
||||
virtual QString getFormName() final override
|
||||
{
|
||||
return tr("About");
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -34,7 +34,10 @@ class AdvancedForm : public GenericForm
|
|||
public:
|
||||
AdvancedForm();
|
||||
~AdvancedForm();
|
||||
virtual QString getFormName() final override {return tr("Advanced");}
|
||||
virtual QString getFormName() final override
|
||||
{
|
||||
return tr("Advanced");
|
||||
}
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *o, QEvent *e) final override;
|
||||
|
|
|
@ -34,7 +34,10 @@ class GeneralForm : public GenericForm
|
|||
public:
|
||||
explicit GeneralForm(SettingsWidget *parent);
|
||||
~GeneralForm();
|
||||
virtual QString getFormName() final override {return tr("General");}
|
||||
virtual QString getFormName() final override
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
private slots:
|
||||
void onEnableIPv6Updated();
|
||||
|
|
|
@ -28,7 +28,10 @@ public:
|
|||
virtual ~GenericForm() {}
|
||||
|
||||
virtual QString getFormName() = 0;
|
||||
QPixmap getFormIcon() {return formIcon;}
|
||||
QPixmap getFormIcon()
|
||||
{
|
||||
return formIcon;
|
||||
}
|
||||
|
||||
protected:
|
||||
QPixmap formIcon;
|
||||
|
|
|
@ -32,7 +32,10 @@ class PrivacyForm : public GenericForm
|
|||
public:
|
||||
PrivacyForm();
|
||||
~PrivacyForm();
|
||||
virtual QString getFormName() final override {return tr("Privacy");}
|
||||
virtual QString getFormName() final override
|
||||
{
|
||||
return tr("Privacy");
|
||||
}
|
||||
|
||||
private slots:
|
||||
void onEnableLoggingUpdated();
|
||||
|
|
|
@ -184,14 +184,10 @@ void GenericChatroomWidget::reloadTheme()
|
|||
void GenericChatroomWidget::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
emit chatroomWidgetClicked(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
|
||||
void GenericChatroomWidget::enterEvent(QEvent*)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ LoginScreen::LoginScreen(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
|
||||
// permanently disables maximize button https://github.com/tux3/qTox/issues/1973
|
||||
this->setWindowFlags(windowFlags() &! Qt::WindowMaximizeButtonHint);
|
||||
this->setWindowFlags(windowFlags() & ~Qt::WindowMaximizeButtonHint);
|
||||
this->setFixedSize(this->size());
|
||||
|
||||
connect(&quitShortcut, &QShortcut::activated, this, &LoginScreen::close);
|
||||
|
@ -271,9 +271,9 @@ void LoginScreen::retranslateUi()
|
|||
void LoginScreen::onImportProfile()
|
||||
{
|
||||
ProfileImporter *pi = new ProfileImporter(this);
|
||||
if(pi->importProfile() == true)
|
||||
{
|
||||
|
||||
if (pi->importProfile())
|
||||
reset();
|
||||
}
|
||||
|
||||
delete pi;
|
||||
}
|
||||
|
|
|
@ -205,7 +205,6 @@ void ScreenGrabberChooserRectItem::mousePressHandle(int x, int y, QGraphicsScene
|
|||
|
||||
if (event->button() == Qt::LeftButton)
|
||||
this->state = HandleResizing;
|
||||
|
||||
}
|
||||
|
||||
void ScreenGrabberChooserRectItem::mouseMoveHandle(int x, int y, QGraphicsSceneMouseEvent* event)
|
||||
|
|
|
@ -563,7 +563,7 @@ void Widget::moveEvent(QMoveEvent *event)
|
|||
|
||||
void Widget::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray() == true)
|
||||
if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray())
|
||||
{
|
||||
event->ignore();
|
||||
this->hide();
|
||||
|
@ -1981,7 +1981,7 @@ void Widget::clearAllReceipts()
|
|||
void Widget::reloadTheme()
|
||||
{
|
||||
QString statusPanelStyle = Style::getStylesheet(":/ui/window/statusPanel.css");
|
||||
ui->tooliconsZone->setStyleSheet(Style::resolve("QPushButton{background-color:@themeDark;border:none;}QPushButton:hover{background-color:@themeMediumDark;border:none;}QPushButton:checked{background-color:@themeMedium;border:none;}QPushButton:pressed{background-color:@themeMediumLight;border:none;}"));
|
||||
ui->tooliconsZone->setStyleSheet(Style::getStylesheet(":/ui/tooliconsZone/tooliconsZone.css"));
|
||||
ui->statusPanel->setStyleSheet(statusPanelStyle);
|
||||
ui->statusHead->setStyleSheet(statusPanelStyle);
|
||||
ui->friendList->setStyleSheet(Style::getStylesheet(":/ui/friendList/friendList.css"));
|
||||
|
|
16
ui/contentDialog/contentDialog.css
Normal file
16
ui/contentDialog/contentDialog.css
Normal file
|
@ -0,0 +1,16 @@
|
|||
QSplitter
|
||||
{
|
||||
color: white;
|
||||
background-color: white;
|
||||
alternate-background-color: white;
|
||||
border-color: white;
|
||||
gridline-color: white;
|
||||
selection-color: white;
|
||||
selection-background-color: white;
|
||||
}
|
||||
|
||||
QSplitter:handle
|
||||
{
|
||||
color: white;
|
||||
background-color: white;
|
||||
}
|
23
ui/tooliconsZone/tooliconsZone.css
Normal file
23
ui/tooliconsZone/tooliconsZone.css
Normal file
|
@ -0,0 +1,23 @@
|
|||
QPushButton
|
||||
{
|
||||
background-color: @themeDark;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QPushButton:hover
|
||||
{
|
||||
background-color: @themeMediumDark;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QPushButton:checked
|
||||
{
|
||||
background-color: @themeMedium;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background-color: @themeMediumLight;
|
||||
border: none;
|
||||
}
|
Loading…
Reference in New Issue
Block a user