Arreglos estéticos

git-svn-id: https://192.168.0.254/svn/Proyectos.Noviseda_FactuGES2/trunk@49 f33bb606-9f5c-448d-9c99-757f00063c96
This commit is contained in:
David Arranz 2010-01-22 18:23:50 +00:00
parent 6f4279d737
commit 39eea68a00
7 changed files with 111 additions and 49 deletions

Binary file not shown.

View File

@ -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 = []

View File

@ -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;

View File

@ -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;

View File

@ -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}

View File

@ -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

View File

@ -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.