modified window
This commit is contained in:
parent
44b3fb6dbe
commit
e4278a25e3
@ -39,6 +39,7 @@ int main(int argc, char* argv[]) {
|
||||
SpdLogger logger("logs/log.txt", 5);
|
||||
|
||||
Application::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
Application::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
Application app(argc, argv);
|
||||
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
||||
|
||||
@ -2235,17 +2235,17 @@
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||
<source>default</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||
<source>silver</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
||||
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||
<source>blue</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -2309,7 +2309,7 @@
|
||||
<translation>属性</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/MainWindow.cpp" line="110"/>
|
||||
<location filename="../ui/MainWindow.cpp" line="112"/>
|
||||
<source>Main View</source>
|
||||
<translation>主视图</translation>
|
||||
</message>
|
||||
@ -2435,12 +2435,12 @@
|
||||
<context>
|
||||
<name>OsgWidget</name>
|
||||
<message>
|
||||
<location filename="../viewer/OsgWidget.cpp" line="131"/>
|
||||
<location filename="../viewer/OsgWidget.cpp" line="144"/>
|
||||
<source>warning</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../viewer/OsgWidget.cpp" line="132"/>
|
||||
<location filename="../viewer/OsgWidget.cpp" line="145"/>
|
||||
<source>open dyt file failed</source>
|
||||
<translation>打开dyt文件失败。</translation>
|
||||
</message>
|
||||
@ -2463,8 +2463,8 @@
|
||||
<message>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.ui" line="26"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="55"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="160"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="167"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="166"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="173"/>
|
||||
<source>play</source>
|
||||
<translation>开始</translation>
|
||||
</message>
|
||||
@ -2529,7 +2529,7 @@
|
||||
<message>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="48"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="52"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="157"/>
|
||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="163"/>
|
||||
<source>pause</source>
|
||||
<translation>暂停</translation>
|
||||
</message>
|
||||
|
||||
@ -186,3 +186,9 @@ void FrameTitleBar::SetSysButton(unsigned int sysBtn) {
|
||||
ui->sys_max->setVisible(static_cast<bool>(ftbButton_ & FTB_MAX));
|
||||
ui->sys_close->setVisible(static_cast<bool>(ftbButton_ & FTB_CLOSE));
|
||||
}
|
||||
|
||||
|
||||
void FrameTitleBar::showEvent(QShowEvent * event)
|
||||
{
|
||||
OnMaxBtnClicked();
|
||||
}
|
||||
@ -46,6 +46,8 @@ protected:
|
||||
void mouseMoveEvent(QMouseEvent* event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
||||
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
|
||||
protected:
|
||||
void OnMinBtnClicked();
|
||||
void OnMaxBtnClicked();
|
||||
|
||||
@ -212,15 +212,6 @@ void OsgWidget::paintEvent(QPaintEvent*) {
|
||||
frame();
|
||||
}
|
||||
|
||||
void OsgWidget::showEvent(QShowEvent * event)
|
||||
{
|
||||
if (nullptr == view_) {
|
||||
return;
|
||||
}
|
||||
qreal devicePixelRatio = screen()->devicePixelRatio();
|
||||
viewUI_->Resize(size().width() * devicePixelRatio, size().height() * devicePixelRatio);
|
||||
}
|
||||
|
||||
void OsgWidget::dragEnterEvent(QDragEnterEvent* event) {
|
||||
LOG_INFO("OsgWidget::dragEnterEvent - Available formats:{}", event->mimeData()->formats().join(",").toStdString());
|
||||
|
||||
|
||||
@ -29,8 +29,6 @@ protected:
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void paintEvent( QPaintEvent* /*event*/ ) override;
|
||||
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
|
||||
// 拖拽事件处理
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
void dragMoveEvent(QDragMoveEvent* event) override;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user