From 1eadb3c19acfe5470a3da4ac6256accb23302be5 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 30 Jul 2011 11:51:52 +1000 Subject: [PATCH] Quick status bar cleanup --- Graphs/graphwindow.cpp | 12 ++++++++++++ Graphs/graphwindow.h | 2 +- daily.cpp | 2 ++ mainwindow.cpp | 8 ++++---- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Graphs/graphwindow.cpp b/Graphs/graphwindow.cpp index 3ebcd662..5e0c58c1 100644 --- a/Graphs/graphwindow.cpp +++ b/Graphs/graphwindow.cpp @@ -90,6 +90,18 @@ bool gGraphWindow::isEmpty() } return empty; } +void gGraphWindow::resizeEvent(QResizeEvent *e) +{ + this->setUpdatesEnabled(false); + this->blockSignals(true); + QGLWidget::resizeEvent(e); + this->blockSignals(false); + this->setUpdatesEnabled(true); + //this->resizeGL(e->size().width(),e->size().height()); + //this->paintGL(); + //e->accept(); +} + void gGraphWindow::AddLayer(gLayer *l) { if (l) { diff --git a/Graphs/graphwindow.h b/Graphs/graphwindow.h index 342adc93..42de60f6 100644 --- a/Graphs/graphwindow.h +++ b/Graphs/graphwindow.h @@ -134,7 +134,7 @@ public: bool isDraggingGraph() { return m_dragGraph; } protected: void updateSelectionTime(qint64 span); - + void resizeEvent(QResizeEvent *); void initializeGL(); QSplitter *splitter; listlink_zoom; diff --git a/daily.cpp b/daily.cpp index de47e1ef..b960996d 100644 --- a/daily.cpp +++ b/daily.cpp @@ -57,6 +57,8 @@ Daily::Daily(QWidget *parent,QGLWidget * shared) : gSplitter=new QSplitter(Qt::Vertical,ui->scrollArea); gSplitter->setStyleSheet("QSplitter::handle { background-color: 'light grey'; }"); gSplitter->setHandleWidth(3); + gSplitter->setOpaqueResize(false); + ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); ui->scrollArea->setWidget(gSplitter); diff --git a/mainwindow.cpp b/mainwindow.cpp index 3091fe91..f8f3b359 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -74,9 +74,9 @@ MainWindow::MainWindow(QWidget *parent) : qstatus=new QLabel("",this); qprogress->hide(); ui->statusbar->setMinimumWidth(200); - ui->statusbar->addPermanentWidget(qstatus2,0); ui->statusbar->addPermanentWidget(qstatus,0); ui->statusbar->addPermanentWidget(qprogress,10); + ui->statusbar->addPermanentWidget(qstatus2,0); Profiles::Scan(); pref["AppName"]="SleepyHead"; @@ -163,7 +163,7 @@ void MainWindow::Startup() }*/ qprogress->hide(); - qstatus->setText(tr("Ready")); + qstatus->setText(""); //qstatusbar->clearMessage(); } @@ -199,7 +199,7 @@ void MainWindow::on_action_Import_Data_triggered() } */ //qDebug() << "overview->ReloadGraphs();"; } - qstatus->setText(tr("Ready")); + qstatus->setText(""); qprogress->hide(); } @@ -267,7 +267,7 @@ void MainWindow::on_webView_loadFinished(bool arg1) QTimer::singleShot(0,this,SLOT(Startup())); first_load=false; } else { - qstatus->setText(tr("Ready")); + qstatus->setText(""); } ui->backButton->setEnabled(ui->webView->history()->canGoBack()); ui->forwardButton->setEnabled(ui->webView->history()->canGoForward());