You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider adding support for High-definition monitors. Nowadays, lot of users have Windows interface scaling level set to 200% and more, to accommodate to 4K displays, so the screen density is no longer 96 DPI. In Toolbar2000, all item sizes are programmed in physical pixels, not adjusted to screen DPI, so the items like toolbar grips, chevrons, arrows look very small.
So the adjustments are needed to multiply element size to actual screen DPI and divide by 96 (normal DPI). It is usually obtaining by using MulDiv instruction.
For example, see how GetTBXDragHandleSize from TBXThemes.pas will look like:
function GetTBXDragHandleSize(const ADC: HDC; const ToolbarInfo: TTBXToolbarInfo): Integer;
const
FDragHandleSizes: array [Boolean, 0..2] of Integer = ((9, 0, 6), (14, 14, 14));
begin
with ToolbarInfo do
begin
if AllowDrag then
Result := MulDiv(FDragHandleSizes[(CloseButtonState and CDBS_VISIBLE) <> 0, DragHandleStyle], GetDeviceCaps(ADC, LOGPIXELSY), 96)
else
Result := 0;
end;
end;
Please consider adding support for custom DPI, other than 96, to accommodate modern high resolution monitors.
I have made a few changes to the code, but it would be better if you fully implement custom DPI support in the main code base.
Thank you very much again for maintaining the TBX library.
The text was updated successfully, but these errors were encountered:
Thank you for maintaining the great TBX software.
Please consider adding support for High-definition monitors. Nowadays, lot of users have Windows interface scaling level set to 200% and more, to accommodate to 4K displays, so the screen density is no longer 96 DPI. In Toolbar2000, all item sizes are programmed in physical pixels, not adjusted to screen DPI, so the items like toolbar grips, chevrons, arrows look very small.
So the adjustments are needed to multiply element size to actual screen DPI and divide by 96 (normal DPI). It is usually obtaining by using MulDiv instruction.
For example, see how GetTBXDragHandleSize from TBXThemes.pas will look like:
function GetTBXDragHandleSize(const ADC: HDC; const ToolbarInfo: TTBXToolbarInfo): Integer;
const
FDragHandleSizes: array [Boolean, 0..2] of Integer = ((9, 0, 6), (14, 14, 14));
begin
with ToolbarInfo do
begin
if AllowDrag then
Result := MulDiv(FDragHandleSizes[(CloseButtonState and CDBS_VISIBLE) <> 0, DragHandleStyle], GetDeviceCaps(ADC, LOGPIXELSY), 96)
else
Result := 0;
end;
end;
Please consider adding support for custom DPI, other than 96, to accommodate modern high resolution monitors.
I have made a few changes to the code, but it would be better if you fully implement custom DPI support in the main code base.
Thank you very much again for maintaining the TBX library.
The text was updated successfully, but these errors were encountered: