From 232a4ae4fb2850c8e9a4d56ffcdcead34dab3773 Mon Sep 17 00:00:00 2001 From: Reinier Sterkenburg Date: Sun, 4 Oct 2020 16:31:36 +0200 Subject: [PATCH 1/2] Removed/replaced old icons; Improved high DPI awareness --- Demos/Demo32/Demo32.dproj | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Demos/Demo32/Demo32.dproj b/Demos/Demo32/Demo32.dproj index 5cebd865..64833a60 100644 --- a/Demos/Demo32/Demo32.dproj +++ b/Demos/Demo32/Demo32.dproj @@ -57,23 +57,25 @@ true - Demo32_Icon.ico + $(BDS)\bin\delphi_PROJECTICON.ico System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 1033 $(BDS)\bin\default_app.manifest true $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + PerMonitorV2 System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) $(BDS)\bin\default_app.manifest true 1033 - Demo32_Icon.ico + $(BDS)\bin\delphi_PROJECTICON.ico true $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + PerMonitorV2 false @@ -88,7 +90,6 @@ Debug - $(BDS)\bin\delphi_PROJECTICON.ico 1033 true Debug @@ -153,10 +154,7 @@ 1.0.0.0 - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - + True From aec4c07aa86663089980b6edc3742315e06b9abd Mon Sep 17 00:00:00 2001 From: Reinier Sterkenburg Date: Sun, 4 Oct 2020 16:31:39 +0200 Subject: [PATCH 2/2] Python code is now Python 3 compatible; PythonEngine now uses last known Python version; Memo font is now Consolas, size 10 --- Demos/Demo32/Unit1.dfm | 85 ++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/Demos/Demo32/Unit1.dfm b/Demos/Demo32/Unit1.dfm index 25978023..caf03f76 100644 --- a/Demos/Demo32/Unit1.dfm +++ b/Demos/Demo32/Unit1.dfm @@ -16,7 +16,7 @@ object Form1: TForm1 OldCreateOrder = True Visible = True PixelsPerInch = 96 - TextHeight = 11 + TextHeight = 13 object Splitter1: TSplitter Left = 0 Top = 169 @@ -32,6 +32,12 @@ object Form1: TForm1 Width = 576 Height = 170 Align = alClient + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'Consolas' + Font.Pitch = fpVariable + Font.Style = [] Lines.Strings = ( 'import spam' '' @@ -40,46 +46,46 @@ object Form1: TForm1 ' Self.OffsetBy(v, v)' '' 'p = spam.Point(2, 5)' - 'print p, type(p)' + 'print (p, type(p))' 'p.OffsetBy( 3, 3 )' - 'print p.x, p.y' - 'print "Name =", p.Name' + 'print (p.x, p.y)' + 'print ("Name =", p.Name)' 'p.Name = '#39'Hello world!'#39 - 'print "Name =", p.Name' + 'print ("Name =", p.Name)' '' - 'p = spam.Point(2, 5) ' - 'print p, type(p)' + 'p = spam.Point(2, 5)' + 'print (p, type(p))' 'p.OffsetBy( 3, 3 )' - 'print p.x, p.y' + 'print (p.x, p.y)' '' '# create a subtype instance' 'p = MyPoint(2, 5)' - 'print p, type(p)' + 'print (p, type(p))' 'p.OffsetBy( 3, 3 )' - 'print p.x, p.y' + 'print (p.x, p.y)' 'p.Foo( 4 )' - 'print p.x, p.y' - 'print dir(spam)' - 'print spam.Point' - 'print "p = ", p, " --> ",' + 'print (p.x, p.y)' + 'print (dir(spam))' + 'print (spam.Point)' + 'print ("p = ", p, " --> ",)' 'if type(p) is spam.Point:' - ' print "p is a Point"' + ' print ("p is a Point")' 'else:' - ' print "p is not a point"' + ' print ("p is not a point")' 'p = 2' - 'print "p = ", p, " --> ",' + 'print ("p = ", p, " --> ",)' 'if type(p) is spam.Point:' - ' print "p is a Point"' + ' print ("p is a Point")' 'else:' - ' print "p is not a point"' + ' print ("p is not a point")' '' - '# You can raise error from a Python script to !' + '# You can raise errors from a Python script too !' - 'print "---------------------------------------------------------' + - '---------"' - 'print "Errors in a Python script"' + 'print ("--------------------------------------------------------' + + '----------")' + 'print ("Errors in a Python script")' 'try:' - ' raise spam.EBadPoint, "this is a test !"' + ' raise spam.EBadPoint("this is a test !")' 'except:' ' pass' '' @@ -90,19 +96,21 @@ object Form1: TForm1 ' err.c = 3' ' raise err' - 'except spam.PointError, what: #it shows you that you can interce' + - 'pt a parent class' - ' print "Catched an error dirived from PointError"' + 'except spam.PointError as what: # this shows that you can interc' + + 'ept a parent class' + ' print ("Caught an error derived from PointError")' - ' print "Error class = ", what.__class__, " a =", what.a, " ' + - ' b =", what.b, " c =", what.c' + ' print ("Error class = ", what.__class__, " a =", what.a, "' + + ' b =", what.b, " c =", what.c)' '' - 'if p == spam.Point(2, 5): ' - ' print "Equal"' + 'if p == spam.Point(2, 5):' + ' print ("Equal")' 'else:' - ' print "Not equal"') - ScrollBars = ssVertical + ' print ("Not equal")') + ParentFont = False + ScrollBars = ssBoth TabOrder = 0 + WordWrap = False end object Panel1: TPanel Left = 0 @@ -128,14 +136,17 @@ object Form1: TForm1 Width = 576 Height = 169 Align = alTop + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'Consolas' + Font.Pitch = fpVariable + Font.Style = [] + ParentFont = False ScrollBars = ssBoth TabOrder = 2 end object PythonEngine1: TPythonEngine - DllName = 'python27.dll' - APIVersion = 1013 - RegVersion = '2.7' - UseLastKnownVersion = False IO = PythonGUIInputOutput1 Left = 32 Top = 16