Skip to content

Commit 95d8484

Browse files
committed
Merge branch 'monitorv2support'
2 parents a9e7334 + adf5f73 commit 95d8484

File tree

10 files changed

+404
-261
lines changed

10 files changed

+404
-261
lines changed

ChangeLog.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
TChromeTabs 2.6
2+
3+
26-11-2020
4+
Update: High-DPI support
5+
Fixed: bug(spell error?) in TChromeTabControl.CalculateRects #58
6+
7+
26-06-2020
8+
Update: DX10.4 Sydney
9+
110
TChromeTabs 2.5
211

312
22-11-2018

Demo/ChromeTabsDemoDX10_4.dproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{c9ed9a5c-a15c-4d5c-af55-c6450d1b6687}</ProjectGuid>
44
<MainSource>ChromeTabsDemoDX10_4.dpr</MainSource>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
77
<DCC_DependencyCheckOutputName>Project2.exe</DCC_DependencyCheckOutputName>
88
<FrameworkType>VCL</FrameworkType>
9-
<ProjectVersion>19.0</ProjectVersion>
9+
<ProjectVersion>19.1</ProjectVersion>
1010
<Base>True</Base>
11-
<Config Condition="'$(Config)'==''">Release</Config>
11+
<Config Condition="'$(Config)'==''">Debug</Config>
1212
<Platform Condition="'$(Platform)'==''">Win32</Platform>
1313
<TargetedPlatforms>3</TargetedPlatforms>
1414
<AppType>Application</AppType>
@@ -77,13 +77,13 @@
7777
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
7878
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
7979
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
80-
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
80+
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
8181
</PropertyGroup>
8282
<PropertyGroup Condition="'$(Base_Win64)'!=''">
8383
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
8484
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
8585
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
86-
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
86+
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
8787
</PropertyGroup>
8888
<PropertyGroup Condition="'$(Cfg_1)'!=''">
8989
<Version>7.0</Version>
@@ -126,7 +126,6 @@
126126
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
127127
<BT_BuildType>Debug</BT_BuildType>
128128
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
129-
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
130129
</PropertyGroup>
131130
<ProjectExtensions>
132131
<Borland.Personality>Delphi.Personality.12</Borland.Personality>

Demo/ChromeTabsDemoDX10_4.res

0 Bytes
Binary file not shown.

Demo/frmMainU.dfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,9 +2837,9 @@ object frmMain: TfrmMain
28372837
object chkActiveNewTab: TCheckBox
28382838
Left = 3
28392839
Top = 199
2840-
Width = 142
2840+
Width = 371
28412841
Height = 17
2842-
Caption = 'Activate new Tab'
2842+
Caption = 'ActivateNewTag'
28432843
Checked = True
28442844
State = cbChecked
28452845
TabOrder = 7

Demo/frmMainU.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ procedure TfrmMain.ChromeTabs2AfterDrawItem(Sender: TObject;
20212021

20222022
if (ChromeTabs2.Tabs.Count = 0) and (ItemType = itTabContainer) and (ChromeTabs2.ActiveDragTabObject = nil) then
20232023
begin
2024-
TabsFont := TGPFont.Create(ChromeTabs2.LookAndFeel.Tabs.DefaultFont.Name, 11);
2024+
TabsFont := TGPFont.Create(ChromeTabs2.LookAndFeel.Tabs.DefaultFont.Name, ChromeTabs2.ScaledFontSize(11));
20252025
TabsTxtBrush := TGPSolidBrush.Create(MakeGDIPColor(clWhite, 255));
20262026
try
20272027
TargetCanvas.SetSmoothingMode(ChromeTabs2.Options.Display.Tabs.CanvasSmoothingMode);

Lib/ChromeTabs.pas

Lines changed: 168 additions & 147 deletions
Large diffs are not rendered by default.

Lib/ChromeTabsClasses.pas

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ TChromeTabsLookAndFeelStyle = class;
6161
function GetSpinnerState: TChromeTabSpinnerState;
6262
function GetHideCloseButton: Boolean;
6363
function GetData: Pointer;
64+
function GetCustomImages: TCustomImageList;
65+
function GetCustomImagesOverlay: TCustomImageList;
66+
function GetCustomImagesSpinnerDownload: TCustomImageList;
67+
function GetCustomImagesSpinnerUpload: TCustomImageList;
6468
procedure SetData(const Value: Pointer);
6569
property Data: Pointer read GetData write SetData;
6670
end;
@@ -126,6 +130,10 @@ TChromeTab = class(TCollectionItem, IChromeTab)
126130
FMarkedForDeletion: Boolean;
127131
FSpinnerState: TChromeTabSpinnerState;
128132
FHideCloseButton: Boolean;
133+
FCustomImages: TCustomImageList;
134+
FCustomImagesOverlay: TCustomImageList;
135+
FCustomImagesSpinnerDownload: TCustomImageList;
136+
FCustomImagesSpinnerUpload: TCustomImageList;
129137

130138
procedure SetActive(Value: boolean);
131139
procedure SetCaption(Value: TCaption);
@@ -155,6 +163,14 @@ TChromeTab = class(TCollectionItem, IChromeTab)
155163
function GetSpinnerState: TChromeTabSpinnerState;
156164
function GetHideCloseButton: Boolean;
157165
function GetData: Pointer;
166+
procedure SetCustomImages(const Value: TCustomImageList);
167+
procedure SetCustomImagesOverlay(const Value: TCustomImageList);
168+
procedure SetCustomImagesSpinnerDownload(const Value: TCustomImageList);
169+
procedure SetCustomImagesSpinnerUpload(const Value: TCustomImageList);
170+
function GetCustomImages: TCustomImageList;
171+
function GetCustomImagesOverlay: TCustomImageList;
172+
function GetCustomImagesSpinnerDownload: TCustomImageList;
173+
function GetCustomImagesSpinnerUpload: TCustomImageList;
158174
protected
159175
procedure DoChanged(ChangeType: TTabChangeType = tcPropertyUpdated); virtual;
160176
function GetDisplayName: string; override;
@@ -175,6 +191,10 @@ TChromeTab = class(TCollectionItem, IChromeTab)
175191
property Caption: TCaption read GetCaption write SetCaption;
176192
property Active: boolean read GetActive write SetActive;
177193
property Tag: integer read GetTag write SetTag;
194+
property CustomImages: TCustomImageList read GetCustomImages write SetCustomImages;
195+
property CustomImagesOverlay: TCustomImageList read GetCustomImagesOverlay write SetCustomImagesOverlay;
196+
property CustomImagesSpinnerUpload: TCustomImageList read GetCustomImagesSpinnerUpload write SetCustomImagesSpinnerUpload;
197+
property CustomImagesSpinnerDownload: TCustomImageList read GetCustomImagesSpinnerDownload write SetCustomImagesSpinnerDownload;
178198
property ImageIndex: {$IF CompilerVersion >= 23.0}System.UITypes.{$IFEND}TImageIndex read GetImageIndex write SetImageIndex;
179199
property ImageIndexOverlay: {$IF CompilerVersion >= 23.0}System.UITypes.{$IFEND}TImageIndex read GetImageIndexOverlay write SetImageIndexOverlay;
180200
property Pinned: Boolean read GetPinned write SetPinned;
@@ -1186,6 +1206,8 @@ TOptions = class(TChromeTabsPersistent)
11861206
procedure Invalidate;
11871207
function GetComponentState: TComponentState;
11881208
function IsDragging: Boolean;
1209+
function ScaledPixels(pPixels: Integer): Integer;
1210+
function ScaledFontSize(fFontSize : Integer) : Integer;
11891211

11901212
function GetLookAndFeel: TChromeTabsLookAndFeel;
11911213
function GetOptions: TOptions;
@@ -1238,6 +1260,46 @@ destructor TChromeTab.Destroy;
12381260
FTabControl.Free;
12391261
end;
12401262

1263+
procedure TChromeTab.SetCustomImages(const Value: TCustomImageList);
1264+
begin
1265+
FCustomImages := Value;
1266+
end;
1267+
1268+
procedure TChromeTab.SetCustomImagesOverlay(const Value: TCustomImageList);
1269+
begin
1270+
FCustomImagesOverlay := Value;
1271+
end;
1272+
1273+
procedure TChromeTab.SetCustomImagesSpinnerDownload(const Value: TCustomImageList);
1274+
begin
1275+
FCustomImagesSpinnerDownload := Value;
1276+
end;
1277+
1278+
procedure TChromeTab.SetCustomImagesSpinnerUpload(const Value: TCustomImageList);
1279+
begin
1280+
FCustomImagesSpinnerUpload := Value;
1281+
end;
1282+
1283+
function TChromeTab.GetCustomImages : TCustomImageList;
1284+
begin
1285+
Result := FCustomImages;
1286+
end;
1287+
1288+
function TChromeTab.GetCustomImagesOverlay : TCustomImageList;
1289+
begin
1290+
Result := FCustomImagesOverlay;
1291+
end;
1292+
1293+
function TChromeTab.GetCustomImagesSpinnerDownload : TCustomImageList;
1294+
begin
1295+
Result := FCustomImagesSpinnerDownload;
1296+
end;
1297+
1298+
function TChromeTab.GetCustomImagesSpinnerUpload : TCustomImageList;
1299+
begin
1300+
Result := FCustomImagesSpinnerUpload;
1301+
end;
1302+
12411303
procedure TChromeTab.SetPinned(const Value: Boolean);
12421304
var
12431305
LastPinned: Integer;

0 commit comments

Comments
 (0)