addtheme:flatgray.
This commit is contained in:
@@ -26,6 +26,7 @@ Form/Transform.h Form/Transform.cpp Form/Transform.ui
|
||||
Control/cusTableWidget.cpp Control/cusTableWidget.h
|
||||
Control/cpTableWidget.h Control/cpTableWidget.cpp
|
||||
GuiUtil/Config.h GuiUtil/Config.cpp
|
||||
../Res/qss.qrc
|
||||
)
|
||||
|
||||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <QLabel>
|
||||
#include <QScreen>
|
||||
#include <QSplitter>
|
||||
#include <QVBoxLayout>
|
||||
#include <fversion.h>
|
||||
|
||||
#include "./ui_frelayGUI.h"
|
||||
@@ -10,7 +11,7 @@
|
||||
|
||||
static LogPrint* logPrint = nullptr;
|
||||
|
||||
frelayGUI::frelayGUI(QWidget* parent) : QMainWindow(parent), ui(new Ui::frelayGUI)
|
||||
frelayGUI::frelayGUI(QWidget* parent) : QDialog(parent), ui(new Ui::frelayGUI)
|
||||
{
|
||||
config_ = std::make_shared<FrelayConfig>();
|
||||
|
||||
@@ -30,10 +31,10 @@ frelayGUI::frelayGUI(QWidget* parent) : QMainWindow(parent), ui(new Ui::frelayGU
|
||||
|
||||
setWindowTitle(QString(tr("frelay %1")).arg(VERSION_NUM));
|
||||
|
||||
QLabel* permanent = new QLabel(this);
|
||||
permanent->setFrameStyle(QFrame::Box | QFrame::Sunken);
|
||||
permanent->setText(QString("%1 on %2").arg(VERSION_GIT_COMMIT, VERSION_GIT_BRANCH));
|
||||
this->statusBar()->addPermanentWidget(permanent);
|
||||
// QLabel* permanent = new QLabel(this);
|
||||
// permanent->setFrameStyle(QFrame::Box | QFrame::Sunken);
|
||||
// permanent->setText(QString("%1 on %2").arg(VERSION_GIT_COMMIT, VERSION_GIT_BRANCH));
|
||||
//this->statusBar()->addPermanentWidget(permanent);
|
||||
}
|
||||
|
||||
frelayGUI::~frelayGUI()
|
||||
@@ -109,7 +110,10 @@ void frelayGUI::ControlLayout()
|
||||
sizes << height() * 2 / 5 << height() * 3 / 5;
|
||||
splitter->setSizes(sizes);
|
||||
|
||||
setCentralWidget(splitter);
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
layout->addWidget(splitter);
|
||||
setLayout(layout);
|
||||
// setCentralWidget(splitter);
|
||||
}
|
||||
|
||||
void frelayGUI::ControlMsgHander(QtMsgType type, const QMessageLogContext& context, const QString& msg)
|
||||
@@ -142,5 +146,5 @@ void frelayGUI::HandleTask(const QVector<TransTask>& tasks)
|
||||
|
||||
void frelayGUI::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
QMainWindow::closeEvent(event);
|
||||
QDialog::closeEvent(event);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <ClientCore.h>
|
||||
#include <QFile>
|
||||
#include <QMainWindow>
|
||||
#include <QDialog>
|
||||
#include <QTabWidget>
|
||||
|
||||
#include "Control/CompareControl.h"
|
||||
@@ -18,7 +18,7 @@ class frelayGUI;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class frelayGUI : public QMainWindow
|
||||
class frelayGUI : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -1,30 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>frelayGUI</class>
|
||||
<widget class="QMainWindow" name="frelayGUI">
|
||||
<widget class="QDialog" name="frelayGUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>frelayGUI</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -29,6 +29,11 @@ int main(int argc, char* argv[])
|
||||
|
||||
frelayGUI w;
|
||||
|
||||
QFile file(":/qss/flatgray.css");
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
a.setStyleSheet(file.readAll());
|
||||
}
|
||||
|
||||
QObject::connect(&a, &SingleApplication::instanceStarted, &w, [&w]() {
|
||||
w.showNormal();
|
||||
w.raise();
|
||||
|
||||
Reference in New Issue
Block a user