mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Fix deprecated in GUI utility class
This commit is contained in:
committed by
Mat Sutcliffe
parent
f8e8318902
commit
7d068cf979
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>260</width>
|
||||
<width>300</width>
|
||||
<height>367</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -159,9 +159,6 @@
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tabStopWidth">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -200,9 +197,6 @@
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tabStopWidth">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -690,7 +690,9 @@ namespace BlackGui
|
||||
|
||||
void CGuiUtility::centerWidget(QWidget *widget)
|
||||
{
|
||||
const QRect screenGeometry = QApplication::desktop()->screenGeometry();
|
||||
// const QRect screenGeometry = QApplication::desktop()->screenGeometry();
|
||||
const QScreen *pScreen = QGuiApplication::screenAt(widget->mapToGlobal({widget->width() / 2, 0}));
|
||||
const QRect screenGeometry = pScreen->availableGeometry();
|
||||
const int x = (screenGeometry.width() - widget->width()) / 2;
|
||||
const int y = (screenGeometry.height() - widget->height()) / 2;
|
||||
widget->move(x, y);
|
||||
|
||||
Reference in New Issue
Block a user