mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-12-15 03:22:05 +08:00
Change window sizePolicy
Change window sizePolicy from setFixedSize to setMinimumSize; Change icon name; Update part of translation.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "mainwindow.h"
|
||||
#include <DMainWindow>
|
||||
#include <DTitlebar>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <DToolButton>
|
||||
|
||||
#include <QLayout>
|
||||
#include <QFileInfo>
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
@@ -18,13 +18,16 @@ MainWindow::MainWindow(QString szTitle,
|
||||
{
|
||||
m_widget = new Widget(szUrl);
|
||||
|
||||
setFixedSize(nWidth, nHeight);
|
||||
// setFixedSize(nWidth, nHeight);
|
||||
// 应 shenmo 要求改成设置最小尺寸试试效果
|
||||
setMinimumSize(nWidth, nHeight);
|
||||
|
||||
titlebar()->setTitle(szTitle);
|
||||
|
||||
setCentralWidget(m_widget);
|
||||
centralWidget()->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
titlebar()->setIcon(QIcon(":/images/deepin-launcher.svg"));
|
||||
titlebar()->setIcon(QIcon(":/images/spark-webapp-runtime.svg"));
|
||||
|
||||
DToolButton *btnBack = new DToolButton(titlebar());
|
||||
btnBack->setIcon(QIcon(":/images/go-previous-24.svg"));
|
||||
|
||||
Reference in New Issue
Block a user