diff --git a/bin/theme.rcc b/bin/theme.rcc index ab7b92a..86132d2 100644 Binary files a/bin/theme.rcc and b/bin/theme.rcc differ diff --git a/src/BusyIndicator/BusyIndicator.cpp b/src/BusyIndicator/BusyIndicator.cpp index 2106cbb..b13c04f 100644 --- a/src/BusyIndicator/BusyIndicator.cpp +++ b/src/BusyIndicator/BusyIndicator.cpp @@ -9,10 +9,11 @@ BusyIndicator::BusyIndicator(QWidget* parent) setAttribute(Qt::WA_TransparentForMouseEvents); QLabel* icon = new QLabel; - icon->resize(80, 80); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - icon->setSizePolicy(sizePolicy); + // icon->setMaximumSize(80, 80); + // QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + // icon->setSizePolicy(sizePolicy); _busy_movie = new QMovie(":gif/BusyIndicator.gif"); // 转圈 GIF + _busy_movie->setScaledSize(QSize(50, 50)); icon->setMovie(_busy_movie); _busy_movie->start(); QLabel* text = new QLabel(QStringLiteral(u"加载数据中......")); @@ -26,14 +27,14 @@ BusyIndicator::BusyIndicator(QWidget* parent) void BusyIndicator::Start() { - // _busy_movie->start(); + _busy_movie->start(); this->setVisible(true); this->update(); } void BusyIndicator::Stop() { - // _busy_movie->stop(); + _busy_movie->stop(); this->setVisible(false); this->update(); } diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5584976..8b6f68f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -304,18 +304,15 @@ void MainWindow::initAction() } } }); - /* - connect(_tree_measure_analysis, &MeasureAnalysisTree::TreeWidget::newMeasureAnalysisProject, new_measurement_analysis_handler); - */ } void MainWindow::applyStyleSheet() { -#ifdef ENABLE_DEBUG - QString style_file_path = "D:/Workspace/EnergySpectrumAnalyerProject/EnergySpectrumAnalyer/style/stylesheet/"; -#else +// #ifdef ENABLE_DEBUG +// QString style_file_path = "D:/Workspace/EnergySpectrumAnalyerProject/EnergySpectrumAnalyer/style/stylesheet/"; +// #else QString style_file_path = ":/stylesheet/"; -#endif +// #endif QFile file_stylesheet_default(style_file_path + "default.qss"); if (file_stylesheet_default.open(QFile::ReadOnly)) { const QString& str_stylesheet_default = file_stylesheet_default.readAll(); @@ -357,6 +354,12 @@ void MainWindow::closeProject(const QString& project_name) } } +void MainWindow::showEvent(QShowEvent *event) +{ + QMainWindow::showEvent(event); + this->applyStyleSheet(); +} + void MainWindow::closeEvent(QCloseEvent* event) { QList models = ProjectList::Instance()->GetProjectModels(); diff --git a/src/MainWindow.h b/src/MainWindow.h index 33d969f..043a76b 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -53,6 +53,7 @@ signals: void newProject(const QString &project_name); protected: + virtual void showEvent(QShowEvent* event) override; virtual void closeEvent(QCloseEvent* event) override; private: diff --git a/src/ParticleTimeDifferenceView/ParticleTimeDifferenceView.cpp b/src/ParticleTimeDifferenceView/ParticleTimeDifferenceView.cpp index 204daa4..e6a36b3 100644 --- a/src/ParticleTimeDifferenceView/ParticleTimeDifferenceView.cpp +++ b/src/ParticleTimeDifferenceView/ParticleTimeDifferenceView.cpp @@ -155,9 +155,6 @@ void ParticleTimeDifferenceView::loadDataFromFile() x_max = bin_max; if ( y_max < count ) y_max = count; - // if ( _max_diff <= bin ) { - // break; - // } } _histogram->setData(new QwtIntervalSeriesData(samples)); _plot->SetAxisInitRange(QwtPlot::xBottom, 0.0f, _x_max); diff --git a/style/stylesheet/default.qss b/style/stylesheet/default.qss index ae25cdf..1a1766c 100644 --- a/style/stylesheet/default.qss +++ b/style/stylesheet/default.qss @@ -1,4 +1,4 @@ -/* + QwtPlot { background-color: white; } @@ -12,18 +12,18 @@ QPlainTextEdit { } QTreeView::item:selected:active{ - color: black; - background: #7bbfea; + color: white; + background: #0078d4; } QTreeView::item:selected:!active { color: black; - background: #7bbfea; + background: white; } QTableView { - selection-color: black; - selection-background-color: #7bbfea; + selection-color: white; + selection-background-color: #0078d4; } QTableView QTableCornerButton::section { @@ -44,8 +44,7 @@ QHeaderView::section { border-top: 0px; } -QHeaderView::section:checked -{ +QHeaderView::section { font-weight: normal; } @@ -91,21 +90,5 @@ QScrollBar::add-page { QScrollBar::sub-page { background: rgba(0, 0, 0, 0); } -*/ -/* -QTreeView[Checkable="false"]::indicator:unchecked { - background: blue; -} -QTreeView[Checkable="false"]::indicator:checked { - background: blue; -} - -QTreeView[Checkable="true"]::unchecked { - background: red; } - -QTreeView[Checkable="true"]::checked { - background: green; -} -*/ diff --git a/style/stylesheet/dock.qss b/style/stylesheet/dock.qss index f78f2fc..f43f7bc 100644 --- a/style/stylesheet/dock.qss +++ b/style/stylesheet/dock.qss @@ -1,4 +1,4 @@ -/* + ads--CDockContainerWidget ads--CDockSplitter::handle { background: #2a5caa; } @@ -10,4 +10,3 @@ ads--CDockSplitter::handle:horizontal { ads--CDockSplitter::handle:vertical { height: 1px; } -*/ \ No newline at end of file