Compare commits
3 Commits
2a05254ffb
...
e4278a25e3
| Author | SHA1 | Date | |
|---|---|---|---|
| e4278a25e3 | |||
| 44b3fb6dbe | |||
| 6cf2b5921e |
@ -39,6 +39,7 @@ int main(int argc, char* argv[]) {
|
|||||||
SpdLogger logger("logs/log.txt", 5);
|
SpdLogger logger("logs/log.txt", 5);
|
||||||
|
|
||||||
Application::setAttribute(Qt::AA_EnableHighDpiScaling);
|
Application::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
Application::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|
||||||
Application app(argc, argv);
|
Application app(argc, argv);
|
||||||
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
||||||
|
|||||||
@ -849,6 +849,8 @@ bool GraphicsWindowQt::releaseContextImplementation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsWindowQt::swapBuffersImplementation()
|
void GraphicsWindowQt::swapBuffersImplementation()
|
||||||
|
{
|
||||||
|
if (_widget->isVisible())
|
||||||
{
|
{
|
||||||
_widget->swapBuffers();
|
_widget->swapBuffers();
|
||||||
|
|
||||||
@ -864,6 +866,7 @@ void GraphicsWindowQt::swapBuffersImplementation()
|
|||||||
if (QGLContext::currentContext() != _widget->context())
|
if (QGLContext::currentContext() != _widget->context())
|
||||||
_widget->makeCurrent();
|
_widget->makeCurrent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GraphicsWindowQt::requestWarpPointer( float x, float y )
|
void GraphicsWindowQt::requestWarpPointer( float x, float y )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2235,17 +2235,17 @@
|
|||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||||
<source>default</source>
|
<source>default</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||||
<source>silver</source>
|
<source>silver</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/FrameTitleBar.cpp" line="143"/>
|
<location filename="../ui/FrameTitleBar.cpp" line="149"/>
|
||||||
<source>blue</source>
|
<source>blue</source>
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2309,7 +2309,7 @@
|
|||||||
<translation>属性</translation>
|
<translation>属性</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../ui/MainWindow.cpp" line="110"/>
|
<location filename="../ui/MainWindow.cpp" line="112"/>
|
||||||
<source>Main View</source>
|
<source>Main View</source>
|
||||||
<translation>主视图</translation>
|
<translation>主视图</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2435,12 +2435,12 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>OsgWidget</name>
|
<name>OsgWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../viewer/OsgWidget.cpp" line="131"/>
|
<location filename="../viewer/OsgWidget.cpp" line="144"/>
|
||||||
<source>warning</source>
|
<source>warning</source>
|
||||||
<translation>警告</translation>
|
<translation>警告</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../viewer/OsgWidget.cpp" line="132"/>
|
<location filename="../viewer/OsgWidget.cpp" line="145"/>
|
||||||
<source>open dyt file failed</source>
|
<source>open dyt file failed</source>
|
||||||
<translation>打开dyt文件失败。</translation>
|
<translation>打开dyt文件失败。</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2463,8 +2463,8 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.ui" line="26"/>
|
<location filename="../ui/Menu/PlayManagerMenu.ui" line="26"/>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="55"/>
|
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="55"/>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="160"/>
|
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="166"/>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="167"/>
|
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="173"/>
|
||||||
<source>play</source>
|
<source>play</source>
|
||||||
<translation>开始</translation>
|
<translation>开始</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2529,7 +2529,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="48"/>
|
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="48"/>
|
||||||
<location filename="../ui/Menu/PlayManagerMenu.cpp" line="52"/>
|
<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>
|
<source>pause</source>
|
||||||
<translation>暂停</translation>
|
<translation>暂停</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@ -186,3 +186,9 @@ void FrameTitleBar::SetSysButton(unsigned int sysBtn) {
|
|||||||
ui->sys_max->setVisible(static_cast<bool>(ftbButton_ & FTB_MAX));
|
ui->sys_max->setVisible(static_cast<bool>(ftbButton_ & FTB_MAX));
|
||||||
ui->sys_close->setVisible(static_cast<bool>(ftbButton_ & FTB_CLOSE));
|
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 mouseMoveEvent(QMouseEvent* event) override;
|
||||||
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
||||||
|
|
||||||
|
virtual void showEvent(QShowEvent *event) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnMinBtnClicked();
|
void OnMinBtnClicked();
|
||||||
void OnMaxBtnClicked();
|
void OnMaxBtnClicked();
|
||||||
|
|||||||
@ -285,6 +285,11 @@ void OsgWidget::OnPresetModelDropped(const QString& modelType, const QString& mo
|
|||||||
height = 0.0;
|
height = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (height < 0.0)
|
||||||
|
{
|
||||||
|
height = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
ModelInfo modelInfo = PresetModelConfigParser::Get().GetModelInfo(modelType, modelName, &success);
|
ModelInfo modelInfo = PresetModelConfigParser::Get().GetModelInfo(modelType, modelName, &success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user