From adc67aac776d340a130c6d466dd19c0b5278ee66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B5=B7?= Date: Tue, 31 Mar 2026 09:49:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/theme.rcc | Bin 156277 -> 157199 bytes src/BusyIndicator/BusyIndicator.cpp | 11 ++++--- src/MainWindow.cpp | 17 ++++++---- src/MainWindow.h | 1 + .../ParticleTimeDifferenceView.cpp | 3 -- style/stylesheet/default.qss | 31 ++++-------------- style/stylesheet/dock.qss | 3 +- 7 files changed, 25 insertions(+), 41 deletions(-) diff --git a/bin/theme.rcc b/bin/theme.rcc index ab7b92adaae3b6141bca62ba3ada6596d4df980f..86132d2fed80a8335f82ed2b68866b0bd3a79889 100644 GIT binary patch delta 1550 zcmb7E%Zd|06z#N(FfF~GWl2C33`FNismP27&TfK1+(~s;B`Ky-6{{8l%a88}=X!F2Vq!52M6r5}RYg zhA%jqlzB>12GQ-&w2VCwgv)NqrsgT-bB3D8u4c@lVGLYDoG`&+!zczKe#UZXOL`X7 zV$^K6_Yde!$zEWl%b+(i)Ixa<8wsc!l9yo@%kPp%IHg5)CY39>Y?sAxi>a}ztG=%2 zEulM(<%!ag>7%hRN@B1CtWdI`ox?%ly|%r}!k;k$ttgw5f{=OmvdpZj^OO~)o|2|D zVZ1*u7)hmvMC2~j7&ju6a@lVQ)`RFBHw%^@MXu?sNI^A2jP8x5C{cn_)T9UYE{xB@ zvh-|}D%m;{@sDJqMhjz@c514_@qoprjE2E^*7Eu?ojWk~&tt8GI3jx0|H9B_Z?Ct@ z;=GXD2rDGD8=_hTp?sWRv|ZULB|bi5+VGf&f@s328DO;Mf-TCB%hn)o$98qM%`xym zY5oTK=3r7so~JD0sGK5cc8oOlqo~ISWM(5*mFsvw zH589Zx(Y;&aG&hPq!u9=M=il+t=6=T66SPm!n*ho>CXvDbr|V>L~gh5qWp7bDgQBy z4eTmV_`d*Q0B7{or!D{L?aY5S^Bb2l-#>n}xADdE8eb1D9{qszTlOIL8t&V^{c!mk Se!q18;qCRQjeYp-d*d%=k;NeZ delta 622 zcmV-!0+IcX%n9|x34d{NWpe-k00RI5VetR}02lxQVQ~Ne009610rmg@2FZAwrIbx? zoG=iE?@0UyH+yMTMN69|t-R`?i7K_XM2&ihdNB3?R*a2|39DB9?;REj%kr^J3mlM` z_nCJ-@Mi6Mca^(U#*v@CNAQXme@v_?wFtOT#!^zH(!tjEet-EMMt_V7XBl^29Aw`l zRGrRP0T>Aw4m`6TAD{SpV3LS2b%~G;@ z7ez6!lgt+ll>8%=MG6kEi|l#;8Cl1Uw;t$)pnaFRh&W91L5r^mF4A*N-| zQkWJBj(=HgG%OV~)10G4AEiOhSUOo~?;Cc>*(9MTqd-YLXLS^hqj`3G&JvjV@oW;Y zm*FeYKIe1(o~K`LYQ|=LaD+YF)C*f53Lnm5rV2Rwj;ERyxGWC)Q|fl1r;MN<~UmYilR5E7K>zG1%sPcRBy0002sFDjF?1>6EEFN2Tcn~K5003A3000000RR93-T(jr Iojj_q0TS8^{Qv*} 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