mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-23 06:33:49 +08:00
加入SpkAbout(无内容)
This commit is contained in:
+15
-1
@@ -14,6 +14,7 @@
|
||||
|
||||
SpkWindow::SpkWindow(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags)
|
||||
{
|
||||
mUseCustomEvents = SpkUi::DtkPlugin == nullptr; // Put to the front, to prevent warnings
|
||||
if(SpkUi::DtkPlugin && !qgetenv("SPARK_NO_DXCB").toInt())
|
||||
SpkUi::DtkPlugin->addWindow(this, parent); // Register window to DXcb so we got Deepin
|
||||
else
|
||||
@@ -24,7 +25,6 @@ SpkWindow::SpkWindow(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(paren
|
||||
mMoving = mResizing = false;
|
||||
mCloseHook = nullptr;
|
||||
mMaximized = windowState().testFlag(Qt::WindowMaximized);
|
||||
mUseCustomEvents = SpkUi::DtkPlugin == nullptr;
|
||||
|
||||
PopulateUi();
|
||||
}
|
||||
@@ -225,6 +225,20 @@ void SpkWindow::closeEvent(QCloseEvent *e)
|
||||
emit Closed();
|
||||
}
|
||||
|
||||
void SpkWindow::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
//FIXME: DOESN'T WORK!
|
||||
// QPainter painter(this);
|
||||
// painter.setBrush(QBrush(Qt::NoBrush));
|
||||
// painter.setPen(QPen(SpkUi::ColorLine));
|
||||
// QRect rect = this->rect();
|
||||
// rect.setWidth(rect.width() - 2);
|
||||
// rect.setHeight(rect.height() - 2);
|
||||
// rect.adjust(-1, -1, 1, 1);
|
||||
// painter.drawRect(rect);
|
||||
// QWidget::paintEvent(e);
|
||||
}
|
||||
|
||||
void SpkWindow::SetCornerRadius(int radius)
|
||||
{
|
||||
mCornerRadius = radius;
|
||||
|
||||
Reference in New Issue
Block a user