Adjusted the layout of dialogs in the desktop application for HiDPI.

master
Pacman Ghost 3 years ago
parent f3e487d03d
commit 864466bbdd
  1. 10
      vasl_templates/main.py
  2. 40
      vasl_templates/ui/about.ui
  3. 24
      vasl_templates/ui/server_settings.ui

@ -24,6 +24,16 @@ import click
from vasl_templates.webapp.utils import SimpleError
# NOTE: We're supposed to do the following to support HiDPI, but it causes the main window
# to become extremely large when the Windows zoom level is high (and it doesn't really fix
# the dialog layout problems anyway :-/).# Since we're a webapp running in a browser,
# desktop DPI isn't really an issue for us, we just need to make sure that the Qt dialogs
# look OK. I adjusted the layout for the About box so it's correct for HiDPI; it doesn't
# look great for normal DPI (too much whitespace), but it's useable.
# # nb: this must be done before the QApplication object is created
# QApplication.setAttribute( PyQt5.QtCore.Qt.AA_EnableHighDpiScaling, True )
# QApplication.setAttribute( PyQt5.QtCore.Qt.AA_UseHighDpiPixmaps, True )
# FUDGE! This needs to be created before showing any UI elements e.g. an error message box.
qt_app = QApplication( sys.argv )

@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
<height>150</height>
<width>460</width>
<height>182</height>
</rect>
</property>
<property name="windowTitle">
@ -40,13 +40,19 @@
<rect>
<x>80</x>
<y>20</y>
<width>321</width>
<height>44</height>
<width>371</width>
<height>61</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="app_name">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
@ -60,6 +66,12 @@
</item>
<item>
<widget class="QLabel" name="build_info">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
@ -77,8 +89,8 @@
<property name="geometry">
<rect>
<x>10</x>
<y>110</y>
<width>391</width>
<y>140</y>
<width>441</width>
<height>31</height>
</rect>
</property>
@ -118,11 +130,17 @@
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>391</width>
<height>17</height>
<y>120</y>
<width>441</width>
<height>21</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>*** HOME URL ***</string>
</property>
@ -134,8 +152,8 @@
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>388</width>
<y>100</y>
<width>441</width>
<height>17</height>
</rect>
</property>

@ -37,7 +37,7 @@
<x>10</x>
<y>30</y>
<width>381</width>
<height>51</height>
<height>58</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_3">
@ -152,7 +152,7 @@
<x>10</x>
<y>30</y>
<width>381</width>
<height>111</height>
<height>116</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
@ -357,7 +357,7 @@
<x>10</x>
<y>30</y>
<width>381</width>
<height>81</height>
<height>86</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_4">
@ -446,18 +446,6 @@
</property>
<item>
<widget class="QLabel" name="chapter_h_image_scaling_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>Image s&amp;caling:</string>
</property>
@ -486,12 +474,6 @@
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="inputMask">
<string/>
</property>

Loading…
Cancel
Save