EtheaDev / StyledComponents

Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
Apache License 2.0
152 stars 34 forks source link

Glyph sizing #12

Closed kentiskis closed 8 months ago

kentiskis commented 8 months ago

hi,

in case when there are several StyledNavigators on form, then glyphs of last one are different (smaller).

Attaching picture and project source.

I'm running Delphi 11.3. Custom Design PPI is 150. Display Scale is 150 also.

Not sure if it is issue of StyledNav or not. Any thoughts are welcome. Thanks,

Antanas demo.zip pic1

carloBarazzetta commented 8 months ago

It's a strange problem caused by pixelsperinch = 150. Loading your dfm in a "96 dpi" designer the problem disappear... I'll investigate...

carloBarazzetta commented 8 months ago

Please try with this fix (then recompile the packages) and give me a feed-back:

procedure TStyledDBNavigator.ChangeScale(M, D: Integer; isDpiChange: Boolean);
begin
  inherited;
  if isDpiChange and (M <> D) then
  begin
    ProcessButtons(
      procedure (ABtn: TStyledNavButton)
      begin
        ABtn.ChangeScale(M, D);
      end
    );
  end;
end;
kentiskis commented 8 months ago

Yes, this fix solved the issue. Thank you for so fast and effective support!

carloBarazzetta commented 8 months ago

Fixed in 3.2.1 version