Changeset 511


Ignore:
Timestamp:
Apr 11, 2018, 11:32:10 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Common package various fixes.
Location:
Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Common/UApplicationInfo.pas

    r510 r511  
    66
    77uses
    8   SysUtils, Classes, Forms, URegistry;
     8  SysUtils, Classes, Forms, URegistry, Controls;
    99
    1010type
     
    1414  TApplicationInfo = class(TComponent)
    1515  private
    16     FDescription: string;
     16    FDescription: TCaption;
    1717    FIdentification: Byte;
    1818    FLicense: string;
     
    5757
    5858implementation
    59                        
     59
    6060procedure Register;
    6161begin
  • Common/UListViewSort.pas

    r510 r511  
    142142var
    143143  I: Integer;
     144  R: TRect;
    144145begin
    145146  with FStringGrid1 do begin
    146     Options := Options - [goEditing, goAlwaysShowEditor];
    147     //Columns.Clear;
    148147    while Columns.Count > ListView.Columns.Count do Columns.Delete(Columns.Count - 1);
    149148    while Columns.Count < ListView.Columns.Count do Columns.Add;
    150149    for I := 0 to ListView.Columns.Count - 1 do begin
    151150      Columns[I].Width := ListView.Columns[I].Width;
     151      if Selection.Left = I then begin
     152        R := CellRect(I, 0);
     153        Editor.Left := R.Left + 2;
     154        Editor.Width := R.Width - 4;
     155      end;
    152156    end;
    153     Options := Options + [goEditing, goAlwaysShowEditor];
    154157  end;
    155158end;
     
    381384  ItemLeft := Item.Left;
    382385  ItemLeft := 23; // Windows 7 workaround
    383  
     386
    384387  Rect1.Left := ItemLeft - CheckWidth - BiasLeft + 1 + XBias;
    385388  //ShowMessage(IntToStr(Tp1.Y) + ', ' + IntToStr(BiasTop) + ', ' + IntToStr(XBias));
  • Common/UScaleDPI.pas

    r510 r511  
    215215  I: Integer;
    216216begin
     217  ImgList.BeginUpdate;
    217218  NewWidth := ScaleX(ImgList.Width, FromDPI.X);
    218219  NewHeight := ScaleY(ImgList.Height, FromDPI.Y);
     
    248249    Temp[i].Free;
    249250  end;
     251  ImgList.EndUpdate;
    250252end;
    251253
     
    316318        MinWidth := ScaleX(MinWidth, FromDPI.X);
    317319        MinHeight := ScaleY(MinHeight, FromDPI.Y);
    318         Width := ScaleX(Width, FromDPI.X);
     320        // Workaround to bad band width auto sizing
     321        //Width := ScaleX(Width, FromDPI.X);
     322        Width := ScaleX(Control.Width + 28, FromDPI.X);
    319323        //Control.Invalidate;
    320324      end;
     325    // Workaround for bad autosizing of coolbar
     326    if AutoSize then begin
     327      AutoSize := False;
     328      Height := ScaleY(Height, FromDPI.Y);
     329      AutoSize := True;
     330    end;
    321331    EndUpdate;
    322332  end;
Note: See TracChangeset for help on using the changeset viewer.