kicad-developers team mailing list archive
Mailing list archive
[PATCH/RFC] UI policy: device-independent sizes
There is a slight deficiency in our UI policy, as it is written without
regard to systems having different font sizes or DPI. The sentence
beginning with "Note that the font used by end users" is a nod to this
possibility, but it requires the user to set their font size in a
certain way to have decent dialog sizes, which worked in the past
because nobody was going around running their systems with 18 point
fonts. With the increasing popularity of displays having physical
resolutions much higher than the old standard of 96 DPI, this is
becoming an unreasonable assumption.
I've attached a patch with a paragraph addressing the use of "dialog
units" (wx's device-independent units) for setting the default size of
dialogs for which the sizers alone do not suffice. I believe this is
ready for inclusion, though there should probably be some discussion
here and it's not complete. In paricular, the next paragraph (about the
maximum size of 1024x768) is very "96 DPI-centric" and should probably
be totally rewritten, but I'm not entirely sure how.
For simplicity, here's the paragraph the patch adds:
Note that for dialogs with flexible contents (lists, text, etc), the
sizers may not be able to produce a reasonable initial size, because
they don't know how much data should be shown by default. For this,
there is `DIALOG_SHIM::SetSizeInDU()`, which uses device-independent
"dialog units" based on the system font size (a wxWidgets feature
borrowed from Windows). Do not set the size directly in pixels, as
it is unlikely to be suitable for systems with different font sizes
>From 0f027706cb9127bd2b09ea907c230263f6ddbef0 Mon Sep 17 00:00:00 2001
From: Chris Pavlina <pavlina.chris@xxxxxxxxx>
Date: Sun, 7 Jan 2018 00:12:39 -0700
Subject: [PATCH] UI policy: default sizes in dialog units
Documentation/development/ui-policy.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/development/ui-policy.md b/Documentation/development/ui-policy.md
index 05fb1957c..ab6f81523 100644
@@ -113,6 +113,14 @@ the dialog is created but before it is shown or use class methods to
re-size the dialog as required. Reset the minimum size to the updated
+Note that for dialogs with flexible contents (lists, text, etc), the sizers
+may not be able to produce a reasonable initial size, because they don't know
+how much data should be shown by default. For this, there is
+`DIALOG_SHIM::SetSizeInDU()`, which uses device-independent "dialog units"
+based on the system font size (a wxWidgets feature borrowed from Windows).
+Do not set the size directly in pixels, as it is unlikely to be suitable for
+systems with different font sizes or DPI.
Dialog windows should not exceed 1024 x 768 when displayed in a 13 point font.
Note that the font used by end users is not something that you control from
within the dialog, but for testing purposes please do not exceed this dialog