From 6a3c9d1d5406e842ba0938b62e9ba9f7d147d966 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 26 Nov 2021 11:32:33 +0100 Subject: [PATCH] Set the a default pixel threshold in CRL/etc/commons.display. NOTE: Due to Python pathes, the NDA.common is *not* seen, even by NDA protected configuration. They are using the non-NDA one. No harm in that, just need to be known... --- crlcore/etc/common/display.py | 5 +++++ hurricane/src/viewer/CellWidget.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/crlcore/etc/common/display.py b/crlcore/etc/common/display.py index aa9c595d..e7fe49b2 100644 --- a/crlcore/etc/common/display.py +++ b/crlcore/etc/common/display.py @@ -13,12 +13,17 @@ # +-----------------------------------------------------------------+ +import Cfg import Viewer +from helpers import overlay, l, u, n from common.colors import toRGB from common.patterns import toHexa def createStyles ( scale=1.0 ): + with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg: + cfg.viewer.minimumSize = 500 + cfg.viewer.pixelThreshold = 5 # ---------------------------------------------------------------------- # Style: Alliance.Coriolis [black]. diff --git a/hurricane/src/viewer/CellWidget.cpp b/hurricane/src/viewer/CellWidget.cpp index 390dc20d..998a67af 100644 --- a/hurricane/src/viewer/CellWidget.cpp +++ b/hurricane/src/viewer/CellWidget.cpp @@ -1112,6 +1112,7 @@ namespace Hurricane { , _textFontHeight (20) , _pixelThreshold (Cfg::getParamInt("viewer.pixelThreshold",50)->asInt()) { + //cerr << "viewer.pixelThreshold=" << _pixelThreshold << endl; //setBackgroundRole ( QPalette::Dark ); //setAutoFillBackground ( false ); setAttribute ( Qt::WA_OpaquePaintEvent );