Mit dem neuen Pb5.40 gibt es jetzt das Problem, daß die Schriftgröße nicht mehr immer angepaßt wird. Die bleibt klein, wenn Windows mit einem Aero-Design verwendet wird. Mit dem klassischen oder dem Basis-Design funktioniert es weiterhin richtig.
Kennt jemand eine Lösung für das Problem? (außer auf Pb5.31 zurückzuwechseln)
Was mir auch wundert, ist, daß Windows mit eingestelltem Aero-Design die Skalierung der IDE übernimmt (entsprechend verschwommen sieht alles aus). Ist das klassische oder das Basis-Design eingestellt, überläßt Windows die Skalierung der IDE...
Hier sind ein paar Bilder, die das Problem illustieren:
Der Test-Code stammt von Danilo
http://www.purebasic.fr/german/viewtopi ... =6&t=28771
Code: Alles auswählen
Prototype proto_SetProcessDPIAware()
If OpenLibrary(0,"user32.dll")
SetProcessDPIAware.proto_SetProcessDPIAware = GetFunction(0,"SetProcessDPIAware")
If SetProcessDPIAware
;Debug "calling SetProcessDPIAware()"
SetProcessDPIAware() ; Windows Vista+ / Windows Server 2008+
EndIf
EndIf
Global _dpiScaleFactorX.d = GetDeviceCaps_(GetDC_(0),#LOGPIXELSX) / 96
Global _dpiScaleFactorY.d = GetDeviceCaps_(GetDC_(0),#LOGPIXELSY) / 96
Macro dpiX(_num_) : (_num_ * _dpiScaleFactorX) : EndMacro
Macro dpiY(_num_) : (_num_ * _dpiScaleFactorY) : EndMacro
; Load the font
t=LoadFont(1, "Arial", 10, #PB_Font_HighQuality) ;Load Arial Font, Size 10 - 28/NOV/2013
SetGadgetFont(#PB_Default, FontID(1))
If t=0 : MessageRequester("Error", "Can't load Arial font.") : EndIf
If OpenWindow(0, dpiX(0), dpiY(0), dpiX(640), dpiY(285), "DPIaware", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, dpiX(10),dpiY( 10),dpiX(200),dpiY(25), "Standard Button")
ButtonGadget(1, dpiX(10),dpiY( 40),dpiX(200),dpiY(25), "Left Button", #PB_Button_Left)
ButtonGadget(2, dpiX(10),dpiY( 70),dpiX(200),dpiY(25), "Right Button", #PB_Button_Right)
ButtonGadget(3, dpiX(10),dpiY(100),dpiX(200),dpiY(60), "Multiline Button (longer text gets automatically wrapped)", #PB_Button_MultiLine)
ButtonGadget(4, dpiX(10),dpiY(170),dpiX(200),dpiY(25), "Toggle Button", #PB_Button_Toggle)
ListViewGadget(5, dpiX(430),dpiY(10),dpiX(200),dpiy(185))
For i = 0 To 100 : AddGadgetItem(5,-1,"Item "+i) : Next
CanvasGadget(6, dpiX(220),dpiY(10),dpiX(200),dpiy(185))
If StartDrawing( CanvasOutput(6) )
Box(0,0,OutputWidth(),OutputHeight(),RGB($40,$40,$40))
Line(dpiX( 0) ,dpiY(0), dpiX(200),dpiy(185),RGB($FF,$FF,$00))
Line(dpiX(200),dpiY(0),-dpiX(200),dpiy(185),RGB($FF,$FF,$00))
StopDrawing()
EndIf
If LoadImage(0,#PB_Compiler_Home+"Examples/Sources/Data/PureBasicLogo.bmp")
ResizeImage(0,dpiX(ImageWidth(0)),dpiY(ImageHeight(0)))
ImageGadget(7,dpiX(10),dpiY(205),dpiX(381),dpiY(68),ImageID(0))
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf