diff --git a/Build/Build.fbl6 b/Build/Build.fbl6 index 15a1ec9..36a36d7 100644 Binary files a/Build/Build.fbl6 and b/Build/Build.fbl6 differ diff --git a/Source/Base/uDMBase.dfm b/Source/Base/uDMBase.dfm index 19907b7..ebd0515 100644 --- a/Source/Base/uDMBase.dfm +++ b/Source/Base/uDMBase.dfm @@ -146,28 +146,14 @@ object dmBase: TdmBase Bitmap = {} end object StyleManager: TJvNavPaneStyleManager - Colors.ButtonColorFrom = clWhite - Colors.ButtonColorTo = 12435133 - Colors.ButtonHotColorFrom = 13009540 - Colors.ButtonHotColorTo = 13009540 - Colors.ButtonSelectedColorFrom = 14602190 - Colors.ButtonSelectedColorTo = 14602190 - Colors.SplitterColorFrom = 13026246 - Colors.SplitterColorTo = 9211532 - Colors.DividerColorFrom = 15725551 - Colors.DividerColorTo = 13026246 - Colors.HeaderColorFrom = 8684164 - Colors.HeaderColorTo = 8684164 - Colors.FrameColor = 8684676 - Colors.ToolPanelHeaderColorFrom = clWhite - Colors.ToolPanelHeaderColorTo = 12435133 + Colors.ButtonSeparatorColor = 2987520 Fonts.NavPanelFont.Charset = DEFAULT_CHARSET Fonts.NavPanelFont.Color = clWindowText Fonts.NavPanelFont.Height = -13 Fonts.NavPanelFont.Name = 'Tahoma' Fonts.NavPanelFont.Style = [] Fonts.NavPanelHotTrackFont.Charset = DEFAULT_CHARSET - Fonts.NavPanelHotTrackFont.Color = clWindow + Fonts.NavPanelHotTrackFont.Color = clWindowText Fonts.NavPanelHotTrackFont.Height = -13 Fonts.NavPanelHotTrackFont.Name = 'Tahoma' Fonts.NavPanelHotTrackFont.Style = [] diff --git a/Source/Base/uDMBase.pas b/Source/Base/uDMBase.pas index 85971ed..6e569e6 100644 --- a/Source/Base/uDMBase.pas +++ b/Source/Base/uDMBase.pas @@ -112,10 +112,10 @@ end; procedure TdmBase.OnTBXThemeChange(Sender: TObject); begin - InitStyleManager; +{ InitStyleManager; if Assigned(FOnThemeChange) then - FOnThemeChange(Sender); + FOnThemeChange(Sender);} end; procedure TdmBase.SalvarConfiguracion; diff --git a/Source/Cliente/Utiles/uNavPaneUtils.pas b/Source/Cliente/Utiles/uNavPaneUtils.pas index 34646ee..001d9b4 100644 --- a/Source/Cliente/Utiles/uNavPaneUtils.pas +++ b/Source/Cliente/Utiles/uNavPaneUtils.pas @@ -14,7 +14,7 @@ implementation uses ComCtrls, Classes, Math, SpTBXDkPanels, StrUtils, SysUtils, - ExtCtrls, Graphics, Dialogs, SpTBXControls; + ExtCtrls, Graphics, Dialogs, JvLinkLabel, JvLabel, StdCtrls; procedure PopulateNavPagePane(AParentControl : TWinControl; @@ -28,9 +28,40 @@ begin for ItemIndex := 0 to (AMenuItem.Count - 1) do begin if ((not AMenuItem[ItemIndex].IsLine) // que no sea una línea separadora - and (AMenuItem[ItemIndex].Count = 0)) // y que no sea el padre de un submenú + and (AMenuItem[ItemIndex].Count = 0) // que no sea el padre de un submenú + and (AMenuItem[ItemIndex].Visible)) // y que sea visible then - with TSpTBXLabel.Create(Application) do + with TJvLabel.Create(AParentControl) do + begin + Parent := AParentControl;//APanel; + ParentFont := True; + Align := alTop; + Tag := AMenuItem[ItemIndex].Tag; + Caption := AMenuItem[ItemIndex].Caption; + Action := AMenuItem[ItemIndex].Action; + + HotTrack := True; + HotTrackFont.Style := [fsUnderline]; + + Images := AImageList; + ImageIndex := AMenuItem[ItemIndex].ImageIndex; + + Height := AImageList.Height; + + Margins.Top := 0; + Margins.Bottom := 6; + Margins.Left := 10; + Margins.Right := 10; + AlignWithMargins := True; + + AutoSize := True; + Layout := tlCenter; + Transparent := True; + + AHeight := AHeight + Margins.Top + Margins.Bottom + Height; + end; + +{ with TSpTBXLabel.Create(Application) do begin Parent := AParentControl;//APanel; Align := alTop; @@ -38,6 +69,7 @@ begin Tag := AMenuItem[ItemIndex].Tag; Caption := AMenuItem[ItemIndex].Caption; Action := AMenuItem[ItemIndex].Action; + Images := AImageList; ImageIndex := AMenuItem[ItemIndex].ImageIndex; if ItemIndex = 0 then @@ -47,10 +79,12 @@ begin Margins.Bottom := 6; Margins.Left := 10; Margins.Right := 10; + AlignWithMargins := True; Height := 18; + Color := clRed; Invalidate; - AHeight := AHeight + Margins.Top + Margins.Bottom + Height; - end; + AHeight := AHeight + Margins.Top + Margins.Bottom + Height; + end;} end; AParentControl.Height := AHeight; end; diff --git a/Source/Cliente/uNavPaneController.pas b/Source/Cliente/uNavPaneController.pas index 0bcd3b2..efbb809 100644 --- a/Source/Cliente/uNavPaneController.pas +++ b/Source/Cliente/uNavPaneController.pas @@ -47,7 +47,7 @@ implementation uses Dialogs, uModuleController, uAcercaDe, uNavPaneUtils, uMainMenuController, uClienteUtils, Menus, uDMBase, - uFactuGES_App, uBizEmpresas, JvPageList; + uFactuGES_App, uBizEmpresas, JvPageList, Graphics; { TNavPaneController } @@ -64,6 +64,11 @@ begin Enabled := false; Cursor := crDefault; StyleManager := dmBase.StyleManager; + Margins.Top := 0; + Margins.Bottom := 6; + Margins.Left := 0; + Margins.Right := 0; + AlignWithMargins := True; end; end; @@ -164,7 +169,8 @@ begin PopulateNavPagePane(ASeccion, TMenuItem(AListaSecciones.Objects[ASeccionCount]), FLargeImages, dmBase.StyleManager); - ASeccion.Height := ASeccion.Height + ADivisor.Height; + + ASeccion.Height := ASeccion.Height + ADivisor.Margins.Top + ADivisor.Margins.Bottom + ADivisor.Height; end; {$IFDEF MULTIEMPRESA} diff --git a/Source/Cliente/uPantallaPrincipal.dfm b/Source/Cliente/uPantallaPrincipal.dfm index e9ec65a..ec4f01e 100644 --- a/Source/Cliente/uPantallaPrincipal.dfm +++ b/Source/Cliente/uPantallaPrincipal.dfm @@ -2,8 +2,8 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 358 Top = 250 Caption = 'Pantalla principal' - ClientHeight = 553 - ClientWidth = 886 + ClientHeight = 551 + ClientWidth = 884 Color = clWindow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -25,8 +25,8 @@ object fPantallaPrincipal: TfPantallaPrincipal AlignWithMargins = True Left = 5 Top = 5 - Width = 876 - Height = 533 + Width = 874 + Height = 531 Margins.Left = 5 Margins.Top = 5 Margins.Right = 5 @@ -36,11 +36,13 @@ object fPantallaPrincipal: TfPantallaPrincipal TabOrder = 0 ShowCaption = False ShowCaptionWhenDocked = False + ExplicitTop = 28 + ExplicitHeight = 508 object JvSyncSplitter1: TJvSyncSplitter Left = 210 Top = 0 Width = 5 - Height = 533 + Height = 531 ResizeStyle = rsPattern ExplicitTop = 5 ExplicitHeight = 570 @@ -49,7 +51,7 @@ object fPantallaPrincipal: TfPantallaPrincipal Left = 0 Top = 0 Width = 210 - Height = 533 + Height = 531 ActivePage = pagInicio Align = alLeft AutoHeaders = True @@ -65,6 +67,7 @@ object fPantallaPrincipal: TfPantallaPrincipal Colors.ButtonHotColorTo = 13009540 Colors.ButtonSelectedColorFrom = 14602190 Colors.ButtonSelectedColorTo = 14602190 + Colors.ButtonSeparatorColor = 2987520 Colors.SplitterColorFrom = 13026246 Colors.SplitterColorTo = 9211532 Colors.DividerColorFrom = 15725551 @@ -84,17 +87,18 @@ object fPantallaPrincipal: TfPantallaPrincipal NavPanelFont.Name = 'Tahoma' NavPanelFont.Style = [] NavPanelHotTrackFont.Charset = DEFAULT_CHARSET - NavPanelHotTrackFont.Color = clWindow + NavPanelHotTrackFont.Color = clWindowText NavPanelHotTrackFont.Height = -13 NavPanelHotTrackFont.Name = 'Tahoma' NavPanelHotTrackFont.Style = [] SmallImages = ModulesSmallImageList OnChange = JvNavigationPaneChange + ExplicitHeight = 508 object pagInicio: TJvNavPanelPage Left = 0 Top = 0 Width = 208 - Height = 460 + Height = 458 Background.Stretch = False Background.Proportional = False Background.Center = False @@ -102,15 +106,17 @@ object fPantallaPrincipal: TfPantallaPrincipal Background.Transparent = False Caption = 'Inicio' ImageIndex = 0 + ExplicitHeight = 435 object Panel1: TPanel Left = 0 - Top = 374 + Top = 372 Width = 208 Height = 86 Align = alBottom Color = clWindow ParentBackground = False TabOrder = 1 + ExplicitTop = 349 object Label1: TLabel Left = 38 Top = 29 @@ -157,22 +163,24 @@ object fPantallaPrincipal: TfPantallaPrincipal object pnlBorde: TJvXPContainer Left = 215 Top = 0 - Width = 661 - Height = 533 + Width = 659 + Height = 531 BoundColor = clActiveCaption BoundLines = [blLeft, blTop, blRight, blBottom] Caption = 'pnlBorde' Align = alClient + ExplicitHeight = 508 object pnlMain: TSpTBXDockablePanel Left = 1 Top = 1 - Width = 659 - Height = 531 + Width = 657 + Height = 529 Color = clWindow Align = alClient TabOrder = 0 ShowCaption = False ShowCaptionWhenDocked = False + ExplicitHeight = 506 object lblBienvenido: TLabel Left = 8 Top = 8 @@ -209,8 +217,8 @@ object fPantallaPrincipal: TfPantallaPrincipal end object SpTBXStatusBar1: TSpTBXStatusBar Left = 0 - Top = 543 - Width = 886 + Top = 541 + Width = 884 Height = 10 object SpTBXLabelItem1: TSpTBXLabelItem Images = StatusPanelImageList @@ -615,11 +623,13 @@ object fPantallaPrincipal: TfPantallaPrincipal Caption = 'Empresa' object Listadeempresas1_OLD: TMenuItem Caption = 'Selecci'#243'n de empresas' + Visible = False OnClick = Listadeempresas1_OLDClick end object N1_OLD: TMenuItem Tag = 100 Caption = '-' + Visible = False end object Informacindeempresa1: TMenuItem Tag = 10 diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 88f517e..1bcf606 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -9,7 +9,8 @@ uses JvXPCore, JvXPContainer, pngimage, ExtCtrls, StdCtrls, SpTBXItem, JvPageList, JvExControls, JvExExtCtrls, JvSplitter, JvSyncSplitter, SpTBXDkPanels, uCustomEditor, uHostManager, uGUIBase, - Dialogs, jpeg, TB2Dock, TB2Item; + Dialogs, jpeg, TB2Dock, TB2Item, TntStdCtrls, SpTBXEditors, TB2Toolbar, + JvLinkLabel, JvLabel, SpTBXControls; type IMainForm = interface(IHostForm) @@ -128,6 +129,7 @@ type procedure InicializarUI; procedure OnThemeChange(Sender: TObject); procedure ExecuteActionMenu(Sender : TObject); + procedure InitStyleManager; //procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND; protected function GetWorkPanel : TWinControl; @@ -150,7 +152,7 @@ uses uSplash, uAcercaDe, UxTheme, Themes, uMenuUtils, uBizEmpresas, uFactuGES_App, uDMBase, uDataModuleConexion, uModuleController, uMainMenuController, uNavPaneController, - uDialogUtils, cxControls, SpTBXSkins; + uDialogUtils, cxControls, SpTBXSkins, SpTBXDefaultSkins; {$R *.dfm} @@ -182,15 +184,19 @@ begin Application.Title := AppFactuGES.AppName + ' ' + AppFactuGES.AppVersion; Caption := Application.Title; - JvNavigationPane.StyleManager := dmBase.StyleManager; - dmBase.OnThemeChange := Self.OnThemeChange; - Self.OnThemeChange(Self); // Forzar el refresco de los colores del tema activo - actLogin.Execute; end; procedure TfPantallaPrincipal.FormShow(Sender: TObject); begin + // Set skin type to sknTBX + SkinManager.SetSkin('Office 2003'); + + dmBase.OnThemeChange := Self.OnThemeChange; + JvNavigationPane.StyleManager := dmBase.StyleManager; + + InitStyleManager; + InicializarUI; end; @@ -330,9 +336,6 @@ var begin ShowHourglassCursor; try - // Set skin type to sknTBX - SkinManager.ChangeControlSkinType(Self, sknSkin); - for i := 0 to AppFactuGES.ModuleManager.ModulesCount - 1 do MainMenuController.RegisterModule(AppFactuGES.ModuleManager.Modules[i]); @@ -624,4 +627,27 @@ begin AppFactuGES.EmpresasController.Ver(AppFactuGES.EmpresaActiva); end; + +procedure TfPantallaPrincipal.InitStyleManager; +begin + if not SkinManager.IsXPThemesEnabled then + dmBase.StyleManager.Theme := nptStandard + else begin + //TBXSwitcher.EnableXPStyles := True; + with dmBase.StyleManager do + begin + if SkinManager.CurrentSkin is TSpTBXOffice2003Skin then + begin + case SpGetLunaScheme of + lusBlue : Theme := nptXPBlue; + lusMetallic : Theme := nptXPSilver; + lusGreen : Theme := nptXPOlive; + else + Theme := nptStandard; + end; + end; + end; + end; +end; + end.