Martijn Laan 4 tháng trước cách đây
mục cha
commit
d7fd603446

+ 1 - 4
Components/BidiCtrls.pas

@@ -85,10 +85,7 @@ begin
       WS_EX_RTLREADING and WS_EX_LEFTSCROLLBAR, but not WS_EX_RIGHT. This can be confirmed by
       inspecting the style of a task dialog command link button. However, if VCL Styles is
       active, this should not be done since the style hook does not expect it at all. }
-    var LStyle := StyleServices(Self);
-    if not LStyle.Enabled or LStyle.IsSystemStyle then
-      LStyle := nil;
-    if LStyle = nil then
+    if not IsCustomStyleActive then
       Params.ExStyle := Params.ExStyle or WS_EX_LAYOUTRTL;
   end;
 end;

+ 6 - 4
Projects/Src/Setup.UninstallProgressForm.pas

@@ -133,14 +133,16 @@ begin
     WizardSmallBitmapImage.InitializeFromIcon(HInstance, PChar('MAINICON' + AMainIconPostfix), clNone, [32, 48, 64]); {don't localize}
 
   { Initialize wizard style - also see TWizardForm.Create }
-  const CustomStyleActive = IsCustomStyleActive;
-  if CustomStyleActive then begin
+  var LStyle := StyleServices(Self);
+  if not LStyle.Enabled or LStyle.IsSystemStyle then
+    LStyle := nil;
+  if LStyle <> nil then begin
     { TNewNotebook ignores VCL Styles so it needs a bit of help }
     OuterNotebook.ParentColor := True;
-    Color := StyleServices(Self).GetStyleColor(scWindow);
+    Color := LStyle.GetStyleColor(scWindow);
   end;
   if AModernStyle then begin
-    if not CustomStyleActive then
+    if LStyle = nil then
       OuterNotebook.Color := clWindow;
     Bevel1.Visible := False;
   end;

+ 6 - 4
Projects/Src/Setup.WizardForm.pas

@@ -826,16 +826,18 @@ begin
   BackButton.Left := X;
 
   { Initialize wizard style - also see TUninstallProgressForm.Initialize }
-  const CustomStyleActive = IsCustomStyleActive;
-  if CustomStyleActive then begin
+  var LStyle := StyleServices(Self);
+  if not LStyle.Enabled or LStyle.IsSystemStyle then
+    LStyle := nil;
+  if LStyle <> nil then begin
     { TNewNotebook(Page) ignores VCL Styles so it needs a bit of help }
     WelcomePage.ParentColor := True;
     OuterNotebook.ParentColor := True;
     FinishedPage.ParentColor := True;
-    Color := StyleServices(Self).GetStyleColor(scWindow);
+    Color := LStyle.GetStyleColor(scWindow);
   end;
   if shWizardModern in SetupHeader.Options then begin
-    if not CustomStyleActive then
+    if LStyle = nil then
       OuterNotebook.Color := clWindow;
     Bevel1.Visible := False;
   end;