1
0
Fork 0

Fix appearance, assemble and close dialog when using ultra large font

This commit is contained in:
torusrxxx 2020-11-28 16:17:41 +08:00 committed by Duncan Ogilvie
parent 8b024cb171
commit 0d9a76fb04
4 changed files with 1675 additions and 1762 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>484</width>
<height>85</height>
<width>526</width>
<height>86</height>
</rect>
</property>
<property name="windowTitle">
@ -24,17 +24,11 @@
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>

View File

@ -10,6 +10,10 @@ CloseDialog::CloseDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CloseDia
setWindowFlags(windowFlags() & ~(Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint) | Qt::MSWindowsFixedSizeDialogHint);
SetApplicationIcon(QDialog::winId());
bCanClose = false;
// Resize window
int requiredWidth = ui->label->fontMetrics().boundingRect(ui->label->text()).width();
if(width() < requiredWidth)
resize(requiredWidth, height());
}
CloseDialog::~CloseDialog()

View File

@ -13,22 +13,18 @@
<property name="windowTitle">
<string/>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>220</width>
<height>80</height>
</rect>
</property>
<property name="text">
<string>Closing Debugger...</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Closing Debugger...</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>