Skip to content

Commit 486214a

Browse files
committed
add resizeable_dialog_b config setting Fixes #250
1 parent 0c1731c commit 486214a

8 files changed

Lines changed: 69391 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ For more comprehensive installation instructions, please refer to [INSTALLATION.
175175
31. The behaviour of Toplevel ('pop-up') dialogs will depend on the screen resolution and 'transient' setting. If the width or height of a Toplevel dialog exceeds the screen resolution, the dialog will be displayed in a scrollable, resizeable window. Otherwise, the dialog is displayed as a fixed, non-resizeable panel.
176176
- A boolean configuration setting `transient_dialog_b` governs whether Toplevel dialogs are 'transient' (i.e. always on top of main application dialog) or not. Changing this setting to `0` allows Toplevel dialogs to be minimised independently of the main application window, but be mindful that some dialogs may end up hidden behind others e.g. "Open file/folder" dialogs. **If a file open button appears unresponsive, check that the "Open file/folder" panel isn't already open but obscured**.
177177
- If you're accessing the desktop via a VNC session (e.g. to a headless Raspberry Pi) it is recommended to keep the setting at the default `1`, as VNC may not recognise keystrokes on overlaid non-transient windows.
178+
- A boolean configuration setting `resizeable_dialog_b` governs whether *all* Toplevel dialogs are resizeable, irrespective of the default setting in `DialogState`.
178179

179180
#### <a name="widgets">User-selectable widgets</a>
180181
---

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# PyGPSClient Release Notes
22

3+
### RELEASE 1.6.9
4+
5+
1. Add manually-editable `resizeable_dialog_b` configuration setting as a workaround for screen scaling issues on some platforms (e.g. Ubuntu Wayland). Fixes #250.
6+
37
### RELEASE 1.6.8
48

59
1. Updates to experimental RINEX conversion dialog for pygnssutils >=1.2.1. Provisional support for RINEX 4.02 and GPS CNAV added.

pygpsclient.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"IMU Monitor": false,
1616
"checkforupdate_b": 0,
1717
"transient_dialog_b": 1,
18+
"resize_dialog_b": 0,
1819
"guiupdateinterval_f": 0.2,
1920
"mapupdateinterval_n": 60,
2021
"defaultport_s": "USB",

src/pygpsclient/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
:license: BSD 3-Clause
99
"""
1010

11-
__version__ = "1.6.8"
11+
__version__ = "1.6.9"

src/pygpsclient/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def __init__(self, app):
109109
**self.widget_config,
110110
"checkforupdate_b": 1,
111111
"transient_dialog_b": 1, # whether pop-up dialogs are on top of main app window
112+
"resizeable_dialog_b": 0, # whether pop-up dialogs are all resizeable
112113
"guiupdateinterval_f": GUI_UPDATE_INTERVAL, # GUI widget update interval in seconds
113114
"mapupdateinterval_n": MAP_UPDATE_INTERVAL,
114115
"defaultport_s": RCVR_CONNECTION,

src/pygpsclient/toplevel_dialog.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,13 @@ def __init__(self, app, dlgname: str, *args, **kwargs):
7878
self._dlgname = dlgname
7979
self.logger = logging.getLogger(f"{APPNAME}.{dlgname}")
8080
self.width, self.height = 300, 300 # initial, updated in finalise()
81-
self._resizable = kwargs.pop(
82-
"resizable", self.__app.dialog_state.state[self._dlgname].get(RESIZE, False)
83-
)
81+
if self.__app.configuration.get("resizeable_dialog_b") == 1:
82+
self._resizable = True
83+
else:
84+
self._resizable = kwargs.pop(
85+
"resizable",
86+
self.__app.dialog_state.state[self._dlgname].get(RESIZE, False),
87+
)
8488
transient = kwargs.pop(
8589
"transient", self.__app.configuration.get("transient_dialog_b")
8690
)

tests/pygpsdata_rinextest.log

Lines changed: 69375 additions & 0 deletions
Large diffs are not rendered by default.

tests/test_static.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def testconfiguration(self):
141141
self.assertEqual(cfg.get("lbandclientdrat_n"), 2400)
142142
self.assertEqual(cfg.get("userport_s"), "")
143143
self.assertEqual(cfg.get("spartnport_s"), "")
144-
self.assertEqual(len(cfg.settings), 156)
144+
self.assertEqual(len(cfg.settings), 157)
145145
kwargs = {"userport": "/dev/ttyACM0", "spartnport": "/dev/ttyACM1"}
146146
cfg.loadcli(**kwargs)
147147
self.assertEqual(cfg.get("userport_s"), "/dev/ttyACM0")

0 commit comments

Comments
 (0)