修改样式
This commit is contained in:
parent
f5c61d6940
commit
adc67aac77
BIN
bin/theme.rcc
BIN
bin/theme.rcc
Binary file not shown.
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<MeasureAnalysisProjectModel *> models = ProjectList::Instance()->GetProjectModels();
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
*/
|
||||
Loading…
Reference in New Issue
Block a user