Recent

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
LCL / Re: Form scaling
« Last post by fxeconomist on Today at 08:09:39 pm »
But it doesn't make any sense. If the Width property is in pixels, or in pixels relative to current UHD resolution, then hardcoding a Wdith/Height inside is a bad thing, right ? Cause these numbers would be really hardcoded to the UHD resolution and wouldn't change.
LCLScaling will make them change since the form stores the PixelsPerInch at which the form was designed. Knowing this all dimensions are adjusted automatically when the resolution changes.

In the Lazarus options ("Environment" > "Form Editor") there is a checkbox "Enforce DPI Scaling at designtime". This should be checked.

The thing is in CodeTyphon the Form Designer has navigation bars on the form, so I can make the form larger while its window remains smaller. When the application starts, the form is created at its full size.
Yes, that's the form editor. You can do this in Lazarus, too, when you install the DockedFormEditor package. I don't use it, so I can't tell which effect it has on LCLScaling.

Thanks for the tips!

Well, the LCL Scaling was there, and I went forward with the DockedFormEditor. It restored the familiar behaviour from CodeTyphon.
Then I tested it again. Went fullhd. Lazarus IDE messed up, but ran the app, and surprisingly, it was good on fullhd. Then went back to UHD and restored desktop!
12
LCL / Re: Form scaling
« Last post by wp on Today at 07:38:50 pm »
But it doesn't make any sense. If the Width property is in pixels, or in pixels relative to current UHD resolution, then hardcoding a Wdith/Height inside is a bad thing, right ? Cause these numbers would be really hardcoded to the UHD resolution and wouldn't change.
LCLScaling will make them change since the form stores the PixelsPerInch at which the form was designed. Knowing this all dimensions are adjusted automatically when the resolution changes.

In the Lazarus options ("Environment" > "Form Editor") there is a checkbox "Enforce DPI Scaling at designtime". This should be checked.

The thing is in CodeTyphon the Form Designer has navigation bars on the form, so I can make the form larger while its window remains smaller. When the application starts, the form is created at its full size.
Yes, that's the form editor. You can do this in Lazarus, too, when you install the DockedFormEditor package. I don't use it, so I can't tell which effect it has on LCLScaling.
13
Third party / Re: InstallAware Using Lazarus IDE
« Last post by Thaddy on Today at 07:21:31 pm »
Such old code should be abandoned.
Some old code s good.
This comes not even close.
14
General / Re: Macros confuse error message line number?
« Last post by MarkMLl on Today at 07:20:43 pm »
Regrettably, that's the way it is and the way it's likely to stay.

Macro error placement can get very nasty if- as an example- a macro is associated with the name of a unit. Regrettably, in Real-World programming, such things are sometimes unavoidable.

MarkMLl
15
16
General / Macros confuse error message line number?
« Last post by Eugene Loza on Today at 07:08:13 pm »
In some situations, like the example below, the error message points to $define instead of actual line where the error has happened:

Code: Pascal  [Select][+][-]
  1. program Project1;
  2. var
  3.   A: TObject;
  4.  
  5. {$macro on}
  6. {$define AObject:=(A as TObject)}
  7.  
  8. begin
  9.   A := TObject.Create(nil)
  10.   AObject.Tag := 0;
  11.   A.Free;
  12. end.

I wonder if there a way to effectively find the actual faulty line in code? In the example it's trivial - a forgotten semicolon and incorrect Create syntax. But when the macro is located inside of an include file and used a few dozens of times throughout a relatively large unit, debugging some trivial typos becomes slightly harder than necessary.
17
Hi,

I need compile a project in lazarus, to run in older 10.7.5 system. On the Monterey (12.5.1) all ok, but on 10.7.5 crash on start.

I tested a simple project without nothing, and the same crash.

Have some compile option to support old system, or something to-do to run on older system?


The details of the report of crash is:

Code: Pascal  [Select][+][-]
  1. Process:         launchd [68384]
  2. Path:            /Users/USER/Documents/*/test_path.app/Contents/MacOS/test_path
  3. Identifier:      com.company.test_path
  4. Version:         ??? (???)
  5. Code Type:       X86-64 (Native)
  6. Parent Process:  launchd [379]
  7.  
  8. Date/Time:       2024-04-16 13:54:00.937 -0300
  9. OS Version:      Mac OS X 10.7.5 (11G63)
  10. Report Version:  9
  11.  
  12. Interval Since Last Report:          34948118 sec
  13. Crashes Since Last Report:           50711
  14. Per-App Crashes Since Last Report:   9
  15. Anonymous UUID:                      6E8BCDDD-A4E0-4A73-9329-57670CD815D1
  16.  
  17. Crashed Thread:  Unknown
  18.  
  19. Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
  20. Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028
  21.  
  22. Backtrace not available
  23.  
  24. Unknown thread crashed with X86 Thread State (64-bit):
  25.   rax: 0x0000000000000055  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  26.   rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x0000000000000000
  27.    r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  28.   r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  29.   rip: 0x00007fff5fc01028  rfl: 0x0000000000010203  cr2: 0x00007fff5fc01028
  30. Logical CPU: 2
  31.  
  32. Binary images description not available
  33.  
  34.  
  35. External Modification Summary:
  36.   Calls made by other processes targeting this process:
  37.     task_for_pid: 1
  38.     thread_create: 0
  39.     thread_set_state: 0
  40.   Calls made by this process:
  41.     task_for_pid: 0
  42.     thread_create: 0
  43.     thread_set_state: 0
  44.   Calls made by all processes on this machine:
  45.     task_for_pid: 20394575
  46.     thread_create: 0
  47.     thread_set_state: 0
  48.  
  49. Model: iMac12,1, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 2.5 GHz, 8 GB, SMC 1.71f22
  50. Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 512 MB
  51. Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x0000, 0x484233535530303447464D384D4D44333320
  52. Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D5434353153364D465238432D50422020
  53. AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.67.5-P2P
  54. Bluetooth: Version 4.0.8f17, 2 service, 18 devices, 1 incoming serial ports
  55. Network Service: Ethernet, Ethernet, en0
  56. Serial ATA Device: ST3500418AS, 500,11 GB
  57. Serial ATA Device: Samsung SSD 850 EVO 1TB, 1 TB
  58. USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 3
  59. USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
  60. USB Device: Dell USB Entry Keyboard, 0x413c  (Dell Inc.), 0x2107, 0xfa120000 / 5
  61. USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
  62. USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 8
  63. USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
  64. USB Device: USB Optical Mouse, 0x046d  (Logitech Inc.), 0xc077, 0xfd130000 / 5
  65. USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 4
  66. USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 3
  67.  
18
Third party / Re: InstallAware Using Lazarus IDE
« Last post by msintle on Today at 06:53:01 pm »
Would anybody like to look into making Lazarus's cross-platform native code setups using InstallAware?

A single project would compile into Windows, Linux (aarch64 and AMD64), and macOS (Intel and Apple Silicon) targets.
19
LCL / Re: Form scaling
« Last post by fxeconomist on Today at 06:48:40 pm »
I don't think I have any reason to switch back. I actually used CodeTyphon because I found Lazarus documentation installed there easily.
Least on my first install, context-sensitive help worked immediately.

I migrated the project to Lazarus because there is just more stuff available, the kind of stuff I would need, like compiling for Android and 3d engines.

All options are set, including the Scaled property of the form.

But it doesn't make any sense. If the Width property is in pixels, or in pixels relative to current UHD resolution, then hardcoding a Wdith/Height inside is a bad thing, right ? Cause these numbers would be really hardcoded to the UHD resolution and wouldn't change.

The thing is in CodeTyphon the Form Designer has navigation bars on the form, so I can make the form larger while its window remains smaller. When the application starts, the form is created at its full size.

In Lazarus the Form Designer doesn't have navigation bars on the form, if I want the full form I have to keep it at full size while designing it.

This became hard, so I thought I can make the form smaller in designer and then readjust it in the .Paint method. But it's resolution hardcoded, so that will cause problems in case I want to compile for another target...
20
Third party / Re: C-evo: New Horizons 1.3.0 release
« Last post by Chronos on Today at 06:32:41 pm »
A new version 1.3.2 was released which supports High DPI screens and scale game interface according system settings.

https://app.zdechov.net/c-evo

One interesting thing about this is that C-evo as a game is pretty big project and it has a lots of hard coded user interface dimension constants so it was not as simple as scaling those constants with some scale function or LCL scaling. So I had to use different approach and I have developed scaling layer between the game and LCL called DpiControls https://app.zdechov.net/c-evo/browser/trunk/Packages/DpiControls . Thanks to that layer which contains many components like TButton, TPanel, TEdit, TForm, etc., it is possible to keep hardcoded constants and use them as points instead of pixels. With some additional bitmap handling to make precise graphics drawing, it is now possible to simply scale the game according either system settings or according to custom set DPI. So that would be another approach to add High DPI support for existing app.
Pages: 1 [2] 3 4 ... 10

TinyPortal © 2005-2018