mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
bugfix: button position
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
#include <Widgets/updatenotifywidget.h>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
: QMainWindow(parent),
|
||||
ui(new Ui::MainWindow),
|
||||
bottomRightPosition(QRect(530,505,250,40))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
isRecovery = false;
|
||||
@@ -83,16 +84,12 @@ void MainWindow::paintEvent(QPaintEvent* event) {
|
||||
path.addRoundedRect(rect(), 8, 8);
|
||||
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);
|
||||
if (!_background.isNull())
|
||||
{
|
||||
int x = (width() - _background.width()) / 2;
|
||||
int y = (height() - _background.height()) / 2;
|
||||
painter.drawPixmap(x, y, _background);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::initialize()
|
||||
@@ -366,7 +363,7 @@ void MainWindow::slotConnectionState(bool flag)
|
||||
entryWidget->loginIsActive(true);
|
||||
|
||||
ui->offlineStartButton->show();
|
||||
ui->offlineStartButton->setGeometry(540,549,250,40);
|
||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -458,6 +455,7 @@ void MainWindow::on_languageComboBox_activated(const QString &arg1)
|
||||
|
||||
void MainWindow::loadToServer()
|
||||
{
|
||||
ui->mainFrame->show();
|
||||
ui->inlineTextDebug->setText(tr("Отправка файлов..."));
|
||||
commonButtonGroupWidget->showProgressBar(true);
|
||||
ui->offlineStartButton->setEnabled(false);
|
||||
@@ -471,6 +469,7 @@ void MainWindow::undoCurrentChanges()
|
||||
{
|
||||
isRecovery = true;
|
||||
emit sigSendCheck();
|
||||
ui->mainFrame->show();
|
||||
|
||||
commonButtonGroupWidget->showProgressBar(true);
|
||||
ui->offlineStartButton->setEnabled(false);
|
||||
@@ -490,7 +489,7 @@ void MainWindow::undoCurrentChanges()
|
||||
commonButtonGroupWidget->startUpdateState();
|
||||
|
||||
isRecovery = false;
|
||||
activateLoadingAnimation(false);
|
||||
activateLoadingAnimation(false);
|
||||
}
|
||||
|
||||
void MainWindow::on_unsafeChangingButton_clicked()
|
||||
@@ -523,10 +522,11 @@ void MainWindow::showUpdateInfo()
|
||||
{
|
||||
activateLoadingAnimation(false);
|
||||
updateWidget->showWithFill();
|
||||
showMainFrame(false);
|
||||
ui->unsafeChangingButton->show();
|
||||
entryWidget->hide();
|
||||
commonButtonGroupWidget->show();
|
||||
ui->offlineStartButton->setGeometry(540,549,250,40);
|
||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
||||
fileCountForUpdate = hashComparer->getFileUpdateCount();
|
||||
|
||||
filesLoaded = 0;
|
||||
@@ -556,7 +556,7 @@ void MainWindow::setUpUi()
|
||||
|
||||
ui->offlineStartButton->show();
|
||||
ui->offlineStartButton->setEnabled(false);
|
||||
ui->offlineStartButton->setGeometry(540,549,250,40);
|
||||
ui->offlineStartButton->setGeometry(bottomRightPosition);
|
||||
|
||||
ui->settingsButton->setIcon(*resourceManager->getSettingsIcon());
|
||||
|
||||
@@ -597,6 +597,12 @@ void MainWindow::activateLoadingAnimation(bool flag)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::showMainFrame(bool flag)
|
||||
{
|
||||
if (flag) ui->mainFrame->show();
|
||||
else ui->mainFrame->hide();
|
||||
}
|
||||
|
||||
void MainWindow::setInlineDebug(QString value)
|
||||
{
|
||||
ui->inlineTextDebug->setText(value);
|
||||
|
||||
Reference in New Issue
Block a user