|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#46 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 54,471
Karma: 182218685
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
The first attached image is the default with the minimum horizontal size which the window seems to open to, the second is the smallest vertical and horizontal size and the third stretched enough to give all the options vertically and a rather long file path horizontally. The displays are 3840x2160 scaled to 175% but changing the scaling from 100% to 250% did not seem to make a noticeable difference. One question is if the resize could be made sticky. Edit: Not exactly sticky but if I edited plugin.py to change the default self.resize to (675, 700), it worked for me. Code:
class EnvVarDialog(QtWidgets.QDialog):
def __init__(self, env_vars, existing, plugin_version, bk):
super().__init__()
self.setWindowTitle("Sigil Environment Variables" + " " + plugin_version + showbeta())
self.resize(675, 700)
self.setMinimumSize(675, 210)
#self.setMaximumSize(1200, 800)
Last edited by DNSB; 09-16-2026 at 08:02 PM. |
|
|
|
|
|
|
#47 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
|
I think the problem occurred in Linux distributions with more unusual themes, which, for example, forced an additional inner margin in elements.
As for the default height increase – I agree. Originally, that default size was perfect, but then I added new entries, and now it really is worth increasing it. P.S. In the past, I always kept in mind never to go overboard with that default size, because people have small monitors – let’s say 800x600px – but today I think I can let that go. |
|
|
|
| Advert | |
|
|
|
|
#48 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,749
Karma: 212493355
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I wouldn't worry overly about edge cases. There are environment variables that can be set to control the high dpi settings that Qt6 defaults to for some of those cases (including disabling it). Some of those can probably be used by users to fix things on legacy-type screen sizes and resolutions.
QT_ENABLE_HIGHDPI_SCALING: Set to 0 to disable automatic high-DPI scaling (reverting to legacy behavior). This is intended for testing only and has no effect on Wayland or macOS. QT_SCALE_FACTOR: Sets a global scale factor multiplier for the entire application, stacking on top of the operating system's scale factor. Use this mainly for debugging or manual overrides. QT_SCALE_FACTOR_ROUNDING_POLICY: Controls how Qt rounds fractional scaling factors (like 125% or 150%).Values include PassThrough (Qt 6 default, which avoids rounding) and Round (Qt 5 default). Set this to Round if you experience visual glitches or text scaling issues at fractional settings on Windows. |
|
|
|
|
|
#49 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,749
Karma: 212493355
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Plenty of examples in my plugins of dialog geometry being saved to/restored from a preferences file. It is of course predicated on a prefs file existing for said plugin.
Save: Code:
self.misc_prefs['windowGeometry'] = self.saveGeometry().toHex().data().decode('ascii')
Code:
if self.misc_prefs['windowGeometry'] is not None:
try:
self.restoreGeometry(QtCore.QByteArray.fromHex(self.misc_prefs['windowGeometry'].encode('ascii')))
except Exception:
pass
self.show()
The hex conversion nonsense is required to get a QByteArray value safely written to/read from a file via preferences.py's json module. Last edited by DiapDealer; Yesterday at 08:30 AM. |
|
|
|
|
|
#50 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,044
Karma: 3761621
Join Date: Jan 2017
Location: Poland
Device: Various
|
That's valuable information.
I'll take my time testing it out. The general takeaway is definitely this: restrict window dimensions as little as possible, because the user knows best. |
|
|
|
| Advert | |
|
|
|
|
#51 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,749
Karma: 212493355
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
|
|
|
|
|
#52 |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 428
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Who'd have thought my little post would have produced so much activity?
Things progressed so rapidly that I missed iteration 0.1.20. I've put 0.1.21 on all machines and nothing to report unless "It's perfection": including on the W11 display at 2560 x 1440 @ 175%. Thank you, Becky |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sigil Qt6 and GUI plugin development changes | DiapDealer | Plugins | 26 | 11-16-2023 11:12 AM |
| [Plugin] SelfCSS for Sigil WYSIWYG CSS editor | byword | Plugins | 5 | 08-30-2023 09:44 AM |
| QT scaling - Ways to change Environment Variables in Windows | Comfy.n | Calibre | 4 | 08-11-2022 11:20 PM |
| [GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
| [Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor | thiago.eec | Development | 7 | 01-09-2019 08:05 PM |