View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031806||Lazarus||LCL||public||2017-05-13 03:07||2017-05-14 15:18|
|Reporter||bald zhang||Assigned To||Ondrej Pokorny|
|Product Version||1.9 (SVN)|
|Summary||0031806: high dpi: grid column width become 0 when equal DefautColWidth|
|Description||4k dislplay, DPI = 192 (200%)|
add columns to a grid, while column's Width = grid.DefaultColWidth,
it will becom 0 when running.
it has the same issue on a form or a frame.
|Tags||No tags attached.|
|Fixed in Revision||54895, 54903|
grid_col_width_error.zip (259,795 bytes)
This is a wanted and documented breaking change: http://wiki.freepascal.org/Lazarus_1.8.0_release_notes#Several_autosized_properties_changed_the_default_value_to_0
Use GetRealDefaultColWidth to retrieve the real (actual) width.
||Sorry, you were right. The TGridColumn.Width must return a valid value. Thanks for reporting. Fixed.|
tested r54897, it's not completely fixed.
Columns.Width was set to 128 to found that Width = DefaultColWidth has problem.
before this revision, Columns was scaled properly, after, it has the same Width with Columns, not scaled.
Can you please describe better what you mean?
If I set 150% scaling in Windows, I get correctly scaled Columns.Width=192. Both designtime and runtime.
in Form1 & Frame1:
grid has two columns, .Width is 64, .Width is 128.
and grid.DefaultColWidth is 64, then I found the problem that .Width set to 0.
after this be fixed, .Width is 128, that's correct; but .Width still keep 128, and I think it should be 256 because my 200% DPI setting.
designtime and runtime has the same issue. I didn't do any desining in trunk version, just load project, compile and run.
and just do some futher test: change .Width to 100 then I got 200, yes - is scaled right, but change back to 128, it still not scaled.
maybe just because: 128 / 64 = 200% ???
||Yes, there was a problem I could spot only with 200%. When I tested with 150% it worked fine. Fixed.|
||it's ok now|
|2017-05-13 03:07||bald zhang||New Issue|
|2017-05-13 03:07||bald zhang||File Added: grid-column-width-bad.png|
|2017-05-13 03:07||bald zhang||File Added: grid-column-width-ok.png|
|2017-05-13 03:09||bald zhang||File Added: grid_col_width_error.zip|
|2017-05-13 12:27||Ondrej Pokorny||Assigned To||=> Ondrej Pokorny|
|2017-05-13 12:27||Ondrej Pokorny||Status||new => assigned|
|2017-05-13 12:27||Ondrej Pokorny||Note Added: 0100282|
|2017-05-13 13:00||Ondrej Pokorny||Fixed in Revision||=> 54895|
|2017-05-13 13:00||Ondrej Pokorny||LazTarget||=> -|
|2017-05-13 13:00||Ondrej Pokorny||Note Added: 0100284|
|2017-05-13 13:00||Ondrej Pokorny||Status||assigned => resolved|
|2017-05-13 13:00||Ondrej Pokorny||Resolution||open => fixed|
|2017-05-13 20:11||bald zhang||Note Added: 0100285|
|2017-05-13 21:28||Ondrej Pokorny||Note Added: 0100286|
|2017-05-14 01:49||bald zhang||Note Added: 0100291|
|2017-05-14 09:07||Ondrej Pokorny||Fixed in Revision||54895 => 54895, 54903|
|2017-05-14 09:07||Ondrej Pokorny||Note Added: 0100293|
|2017-05-14 15:18||bald zhang||Note Added: 0100303|
|2017-05-14 15:18||bald zhang||Status||resolved => closed|