Changeset 174 for trunk/Packages/Common


Ignore:
Timestamp:
Feb 14, 2018, 10:39:55 AM (7 years ago)
Author:
chronos
Message:
  • Added: Basic color theming support. Colors can be changed only for some controls.
Location:
trunk/Packages/Common
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Common.lpk

    r170 r174  
    4040    <License Value="GNU/GPL"/>
    4141    <Version Minor="7"/>
    42     <Files Count="20">
     42    <Files Count="21">
    4343      <Item1>
    4444        <Filename Value="StopWatch.pas"/>
     
    129129        <UnitName Value="UScaleDPI"/>
    130130      </Item20>
     131      <Item21>
     132        <Filename Value="UTheme.pas"/>
     133        <HasRegisterProc Value="True"/>
     134        <UnitName Value="UTheme"/>
     135      </Item21>
    131136    </Files>
    132137    <i18n>
  • trunk/Packages/Common/Common.pas

    r10 r174  
    88
    99uses
    10   StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading, 
    11   UMemory, UResetableThread, UPool, ULastOpenedList, URegistry, 
    12   UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort, 
    13   UPersistentForm, UFindFile, UScaleDPI, LazarusPackageIntf;
     10  StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading,
     11  UMemory, UResetableThread, UPool, ULastOpenedList, URegistry,
     12  UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort,
     13  UPersistentForm, UFindFile, UScaleDPI, UTheme, LazarusPackageIntf;
    1414
    1515implementation
     
    2525  RegisterUnit('UFindFile', @UFindFile.Register);
    2626  RegisterUnit('UScaleDPI', @UScaleDPI.Register);
     27  RegisterUnit('UTheme', @UTheme.Register);
    2728end;
    2829
  • trunk/Packages/Common/UListViewSort.pas

    r170 r174  
    353353  TP1: TPoint;
    354354  XBias, YBias: Integer;
    355   OldColor: TColor;
     355  PenColor: TColor;
     356  BrushColor: TColor;
    356357  BiasTop, BiasLeft: Integer;
    357358  Rect1: TRect;
     
    365366  Item.Left := 0;
    366367  GetCheckBias(XBias, YBias, BiasTop, BiasLeft, ListView);
    367   OldColor := ListView.Canvas.Pen.Color;
     368  PenColor := ListView.Canvas.Pen.Color;
     369  BrushColor := ListView.Canvas.Brush.Color;
    368370  //TP1 := Item.GetPosition;
    369371  lRect := Item.DisplayRect(drBounds); // Windows 7 workaround
     
    408410  end;
    409411  //ListView.Canvas.Brush.Color := ListView.Color;
    410   ListView.Canvas.Brush.Color := clWindow;
    411   ListView.Canvas.Pen.Color := OldColor;
     412  ListView.Canvas.Brush.Color := BrushColor;
     413  ListView.Canvas.Pen.Color := PenColor;
    412414end;
    413415
Note: See TracChangeset for help on using the changeset viewer.