progress line fix for android

This commit is contained in:
Zira project 2020-11-30 20:07:46 +05:00
parent 9a5a9b860c
commit 928480ee4a
2 changed files with 8 additions and 0 deletions

View File

@ -2023,7 +2023,11 @@ void MainWindow::mousePressEvent(QMouseEvent *e)
void MainWindow::resizeEvent(QResizeEvent *event)
{
hideQAPanel();
#if defined(Q_OS_ANDROID)
progressLine->updateGeometry(0, 0, geometry().width());
#else
progressLine->updateGeometry(ui->menuBar->geometry().x(), ui->menuBar->geometry().y() + ui->menuBar->geometry().height(), ui->menuBar->geometry().width());
#endif
progressInfo->updateGeometry(ui->statusBar->geometry().x(), ui->statusBar->geometry().y(), ui->statusBar->width(), ui->statusBar->height());
QMainWindow::resizeEvent(event);
}

View File

@ -45,7 +45,11 @@ void ProgressLine::paintEvent(QPaintEvent */*event*/)
void ProgressLine::updateGeometry(int x, int y, int w)
{
#if defined(Q_OS_ANDROID)
setGeometry(x, y + PROGRESS_LINE_HEIGHT, w, PROGRESS_LINE_HEIGHT);
#else
setGeometry(x, y - PROGRESS_LINE_HEIGHT, w, PROGRESS_LINE_HEIGHT);
#endif
}
void ProgressLine::updateProgress()