diff --git a/Source/Base/uDMBase.pas b/Source/Base/uDMBase.pas index c0156925..07664bd5 100644 --- a/Source/Base/uDMBase.pas +++ b/Source/Base/uDMBase.pas @@ -24,11 +24,11 @@ type FEscribirLog : TCriticalSection; procedure IniciarLog; procedure DetenerLog; - procedure InitStyleManager; procedure OnTBXThemeChange(Sender: TObject); procedure LeerConfiguracion; public - procedure EscribirLog(const AMensaje : String); + procedure InitStyleManager (ThemeID : integer = 0); + procedure EscribirLog(const AMensaje : String); procedure SalvarConfiguracion; property OnThemeChange: TNotifyEvent read FOnThemeChange write FOnThemeChange; @@ -69,28 +69,34 @@ begin JvLogFile.Clear; end; -procedure TdmBase.InitStyleManager; +procedure TdmBase.InitStyleManager(ThemeID : integer = 0); begin - if not USE_THEMES then + if ThemeID < 2 then begin - TBXSwitcher.EnableXPStyles := False; - StyleManager.Theme := nptStandard; - end - else begin - TBXSwitcher.EnableXPStyles := True; - with StyleManager do + if not USE_THEMES then begin - if CurrentTheme is TTBXOffice2003Theme then + TBXSwitcher.EnableXPStyles := False; + StyleManager.Theme := nptStandard; + end + else begin + TBXSwitcher.EnableXPStyles := True; + with StyleManager do begin - case GetOffice2003Scheme of - osBlue : Theme := nptXPBlue; - osMetallic : Theme := nptXPSilver; - osGreen : Theme := nptXPOlive; - else - Theme := nptStandard; + if CurrentTheme is TTBXOffice2003Theme then + begin + case GetOffice2003Scheme of + osBlue : Theme := nptXPBlue; + osMetallic : Theme := nptXPSilver; + osGreen : Theme := nptXPOlive; + else + Theme := nptStandard; + end; end; end; end; + end + else begin + StyleManager.Theme := nptStandard; end; end; diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index dad84375..5aee573f 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -205,6 +205,8 @@ var begin ATitulo := AppFactuGES.GetAppFullName; + dmBase.InitStyleManager(JvNavigationPane.ActivePage.Tag); + if Assigned(AppFactuGES.EmpresaActiva) then ATitulo := AppFactuGES.EmpresaActiva.NOMBRE + ' - ' + ATitulo;