Few BUGs… v16.10

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #70052
    UniSoft
    Participant

    1. bug in TsStatusBar…
    — sSkinManager1.Active := False;
    — sStatusBar1.SizeGrip := True;
    Result already can see in IDE, full StatusBar acts as a SizeGrip
    (WMHitTest always returns HTBOTTOMRIGHT)
    To fix it I changed function in sStatusBar.pas to

    function TsStatusBar.GripPos: TPoint;
    begin
      if FCommonData.SkinManager <> nil then
        with FCommonData.SkinManager, SkinData.CommonSkinData do
          if IsValidImgIndex(GripRightBottom) then begin
            Result := Point(Width - ma[GripRightBottom].Width - BorderWidth, Height - ma[GripRightBottom].Height - BorderWidth);
            Exit;
          end;
    
      Result := Point(Width - GetSystemMetrics(SM_CXSIZEFRAME), Height - GetSystemMetrics(SM_CYSIZEFRAME));
    end;

    2. Incorrectly painted titlebar of Docked form inside sPanel (DockSite:=True)
    inside unit Vcl.DockTabSet; there is next code:

    initialization
      { The TDockTabSet needs a special dock tree to interact with it }
      DefaultDockTreeClass := TCaptionedTabDockTree;

    so to fix this bug need in file sPanel.pas in procedure TsCustomPanel.PaintDragPanel(DC: hdc);
    change condition to:
    Captioned := (DefaultDockTreeClass.ClassName = 'TCaptionedTabDockTree') or (DefaultDockTreeClass.ClassName = 'TCaptionedDockTree');

    #70053
    UniSoft
    Participant

    There is a BUG with resize? still didn’t found how to fix 🙁
    Here is demo project (compiled exe already have fixed bugs from first post).

    alternative link to download example
    _https_://mega.nz/file/sCQxmYQB#FPhNycGCdWy_HEKMnwjNNk32nnSDcxcvDET7oPNqF6A

    Attachments:
    You must be logged in to view attached files.
    #70057
    UniSoft
    Participant

    some updates…
    this resize shaking happens inside

    procedure TsSkinProvider.AC_WMWindowPosChanging(var Message: TWMWindowPosChanging);
    begin
      ...
            with WindowPos^ do begin
              if FScreenSnap and Form.Showing then
                CheckNewPosition(X, Y); // <<<<<<< Here

    This helps to fix (dont’t know if it is correct)

    procedure TsSkinProvider.CheckNewPosition(var X: integer; var Y: integer);
    begin
      ...
        // Check for glued forms
        for i := 0 to Length(HookedComponents) - 1 do
          if (HookedComponents is TForm) and (HookedComponents <> Form) and TForm(HookedComponents).Visible and not Linked(TForm(HookedComponents))
          and ((TForm(HookedComponents).HostDockSite = nil) or TForm(HookedComponents).Floating) then
            if CheckWithForm(TForm(HookedComponents)) then
              Break;
    #70063
    Support
    Keymaster

    Hello!
    Thank you for the demo and code, I will research and fix it soon.

    #70064
    UniSoft
    Participant

    One more BUG with TsButton
    I need a button with drop down list,
    so I put TsButton on the form and set property sButton1.Style:= bsSplitButton;
    everything OK, until I disabled skinning sSkinManager1.Active:=False;
    now button painted as a simple push button (sButton1.Style:= bsPushButton) without arrow.
    Now I put TButton, and I get opposite effect, ie. if skinning enabled I get bsPushButton,
    if skinning disabled I get bsSplitButton.

    #70065
    UniSoft
    Participant

    ahh found…
    You override property Style, and not change the TButton.Style
    fix

    procedure TsButton.SetStyle(const Value: TButtonStyle);
    begin
      if FStyle <> Value then begin
        FStyle := Value;
        TButton(Self).Style := TCustomButton.TButtonStyle(Value); //// <<< I add this
        FCommonData.Invalidate;
      end;
    end;
    #70078
    Support
    Keymaster

    Thank you. Your code was added in the v16.11

    #70101
    UniSoft
    Participant

    BUG! This is long time bug…
    Try this, and the window’s title became inactive… can’t close, move, etc…

    procedure TMainForm.sButton1Click(Sender: TObject);
    begin
      SetPPIAnimated(96);
      SetPPIAnimated(96);
    end;

    Fix:
    If the NewPPI value is not changed then the flag [msAnimScaling] will not be removed

    procedure SetPPIAnimated(NewPPI: integer);
    begin
      //DefaultManager.ManagerState := DefaultManager.ManagerState + [msAnimScaling]; // <<< This line moved down
      if DefaultManager.Options.PixelsPerInch <> NewPPI then begin
        DefaultManager.ManagerState := DefaultManager.ManagerState + [msAnimScaling];
        IterateForms(DefaultManager, AnimaScaleForm, MakeLParam(integer(DefaultManager.Options.ScaleMode = smVCL), NewPPI)); // Start anim threads
        DefaultManager.Options.PixelsPerInch := NewPPI;
      end;
      DefaultManager.Options.ScaleMode := smCustomPPI;
    //  DefaultManager.ManagerState := DefaultManager.ManagerState - [msAnimScaling];
    end;
    #70102
    UniSoft
    Participant
    procedure SetPPIAnimated(NewPPI: integer);
    begin
      if DefaultManager.Options.PixelsPerInch <> NewPPI then begin
        DefaultManager.ManagerState := DefaultManager.ManagerState + [msAnimScaling];
        IterateForms(DefaultManager, AnimaScaleForm, MakeLParam(integer(DefaultManager.Options.ScaleMode = smVCL), NewPPI)); // Start anim threads
        DefaultManager.Options.PixelsPerInch := NewPPI;
        DefaultManager.Options.ScaleMode := smCustomPPI;
      end;
    end;
    #70111
    Support
    Keymaster

    Thank you, I will change it soon.
    Please, start new topics for further new issues.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.