Fix tests on HighDPI screens (#2496)
This commit is contained in:
@@ -18,6 +18,7 @@ if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
|
||||
env = os.environ.copy()
|
||||
env["QT_SCALE_FACTOR"] = "1.0"
|
||||
cmd = [sys.executable, "-m", "pytest", "-vv"]
|
||||
|
||||
if args.o:
|
||||
|
||||
@@ -431,11 +431,13 @@ def testGuiTheme_LoadIcons():
|
||||
assert qIcon.isNull() is False
|
||||
|
||||
# Load it as a pixmap with a size
|
||||
# If this part of the test fails, you may need to set the
|
||||
# environment variable: QT_SCALE_FACTOR=1
|
||||
qPix = iconCache.getPixmap("add", (50, 50))
|
||||
assert isinstance(qPix, QPixmap)
|
||||
assert qPix.isNull() is False
|
||||
assert qPix.width() == 50
|
||||
assert qPix.height() == 50
|
||||
assert qPix.width() == 50, "If this fails, make sure QT_SCALE_FACTOR=1"
|
||||
assert qPix.height() == 50, "If this fails, make sure QT_SCALE_FACTOR=1"
|
||||
|
||||
# Load app icon
|
||||
qIcon = iconCache.getIcon("novelwriter")
|
||||
|
||||
Reference in New Issue
Block a user