mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-30 04:38:37 +00:00
feat: adjust window height by simple mode
This commit is contained in:
parent
3bbea81e12
commit
501365560b
3 changed files with 48 additions and 3 deletions
|
@ -621,6 +621,10 @@ void Dialog::on_useSingleModeCheck_clicked()
|
||||||
ui->wirelessGroupBox->show();
|
ui->wirelessGroupBox->show();
|
||||||
ui->usbGroupBox->show();
|
ui->usbGroupBox->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTimer::singleShot(0, this, [this](){
|
||||||
|
resize(width(), layout()->sizeHint().height());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialog::on_serialBox_currentIndexChanged(const QString &arg1)
|
void Dialog::on_serialBox_currentIndexChanged(const QString &arg1)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>500</width>
|
<width>500</width>
|
||||||
<height>745</height>
|
<height>769</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -72,10 +72,22 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="connectedPhoneList">
|
<widget class="QListWidget" name="connectedPhoneList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>16777215</height>
|
<height>100</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -751,10 +763,22 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="outEdit">
|
<widget class="QTextEdit" name="outEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>140</height>
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>100</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
|
@ -768,6 +792,19 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
|
|
@ -56,6 +56,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||||
|
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
#endif
|
||||||
|
|
||||||
QSurfaceFormat varFormat = QSurfaceFormat::defaultFormat();
|
QSurfaceFormat varFormat = QSurfaceFormat::defaultFormat();
|
||||||
varFormat.setVersion(2, 0);
|
varFormat.setVersion(2, 0);
|
||||||
varFormat.setProfile(QSurfaceFormat::NoProfile);
|
varFormat.setProfile(QSurfaceFormat::NoProfile);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue