mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 11:02:21 +03:00
gui: Set the size of the window to the size of the contents
This commit is contained in:
parent
b7757fbd68
commit
c7e6fc6c7e
@ -938,6 +938,14 @@ void MainWindow::changeEvent(QEvent* event)
|
||||
QMainWindow::changeEvent(event);
|
||||
}
|
||||
|
||||
bool MainWindow::event(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::LayoutRequest) {
|
||||
setFixedSize(sizeHint());
|
||||
}
|
||||
return QMainWindow::event(event);
|
||||
}
|
||||
|
||||
void MainWindow::updateZeroconfService()
|
||||
{
|
||||
QMutexLocker locker(&m_UpdateZeroconfMutex);
|
||||
|
@ -157,6 +157,7 @@ public slots:
|
||||
void stopService();
|
||||
void stopDesktop();
|
||||
void changeEvent(QEvent* event);
|
||||
bool event(QEvent* event);
|
||||
void retranslateMenuBar();
|
||||
#if defined(Q_OS_WIN)
|
||||
bool isServiceRunning(QString name);
|
||||
|
@ -2,31 +2,20 @@
|
||||
<ui version="4.0">
|
||||
<class>MainWindowBase</class>
|
||||
<widget class="QMainWindow" name="MainWindowBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>550</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Barrier</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="m_pGroupServer">
|
||||
<property name="sizePolicy">
|
||||
|
Loading…
Reference in New Issue
Block a user