mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: re-design client
This commit is contained in:
@@ -15,13 +15,16 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
isRecovery = false;
|
||||
setWindowFlag(Qt::FramelessWindowHint);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
|
||||
_background.load(":/resource/SSJ_backgroundDarkSM.png");
|
||||
}
|
||||
|
||||
void MainWindow::createObjects()
|
||||
{
|
||||
qRegisterMetaType<PacketType>("PacketType");
|
||||
|
||||
|
||||
updateWidget = new UpdateNotifyWidget;
|
||||
|
||||
updateWidget->setParent(this);
|
||||
@@ -68,6 +71,28 @@ void MainWindow::createObjects()
|
||||
workerThread->setPriority(QThread::HighestPriority);
|
||||
|
||||
timer = new QTimer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::paintEvent(QPaintEvent* event) {
|
||||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(rect(), 20, 20);
|
||||
painter.setClipPath(path);
|
||||
|
||||
if (!_background.isNull()) {
|
||||
int x = (width() - _background.width()) / 2;
|
||||
int y = (height() - _background.height()) / 2;
|
||||
painter.drawPixmap(x, y, _background);
|
||||
}
|
||||
|
||||
// подложка
|
||||
// painter.setClipping(false);
|
||||
// painter.setBrush(QColor(0, 0, 0, 0));
|
||||
// painter.drawRoundedRect(rect(), 20, 20);
|
||||
}
|
||||
|
||||
void MainWindow::initialize()
|
||||
@@ -511,13 +536,6 @@ void MainWindow::showCompleteDialogBox()
|
||||
{
|
||||
ui->inlineTextDebug->setText(tr("Загрузка завершена"));
|
||||
activateLoadingAnimation(true);
|
||||
|
||||
// QTime dieTime= QTime::currentTime().addSecs(10); //DELAY ДЛЯ ПЕРЕСЧЕТА ХЭША НА СЕРВЕРЕ
|
||||
// while (QTime::currentTime() < dieTime)
|
||||
// QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
|
||||
// activateLoadingAnimation(false);
|
||||
// checkUpdate();
|
||||
}
|
||||
|
||||
void MainWindow::startUnityClient()
|
||||
@@ -548,7 +566,7 @@ void MainWindow::setUpUi()
|
||||
|
||||
waitAnimationWidget->setMovie(resourceManager->getMovie());
|
||||
|
||||
QSize iconSize(30,30);
|
||||
QSize iconSize(20,20);
|
||||
ui->exitButton->setIcon(*resourceManager->getCloseIcon());
|
||||
ui->exitButton->setIconSize(iconSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user