Skip to content

Commit

Permalink
Unify colors with JOP. #50
Browse files Browse the repository at this point in the history
Major changes: change lockout color to brown, slightly change default
gray color.
  • Loading branch information
horacekj committed Aug 13, 2023
1 parent 501630c commit 3fb82f2
Show file tree
Hide file tree
Showing 21 changed files with 253 additions and 246 deletions.
8 changes: 4 additions & 4 deletions src/blocks/BlockCrossing.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
BlockTrack, BlocksTrack;
BlockTrack, BlocksTrack, Symbols;

type
TBlkCrossingPanelState = (disabled = -5, err = -1, otevreno = 0, vystraha = 1, uzavreno = 2, anulace = 3);
Expand Down Expand Up @@ -67,12 +67,12 @@ TPCrossings = class
end;

const
_Def_Cros_Prop: TCrossingPanelProp = (fg: clBlack; bg: clFuchsia; state: otevreno);
_UA_Cros_Prop: TCrossingPanelProp = (fg: $A0A0A0; bg: clBlack; state: otevreno);
_Def_Cros_Prop: TCrossingPanelProp = (fg: TJopColor.black; bg: clFuchsia; state: otevreno);
_UA_Cros_Prop: TCrossingPanelProp = (fg: TJopColor.grayDark; bg: clBlack; state: otevreno);

implementation

uses Symbols, parseHelper, Panel;
uses parseHelper, Panel;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion src/blocks/BlockDerail.pas
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ procedure TPDerails.Show(obj: TDXDraw; blik: boolean; useky: TList<TPTrack>);
TVyhPoloha.minus:
Symbols.Draw(SymbolSet.IL_Symbols, derail.Pos, _S_DERAIL_B + derail.symbol + 2, fg, bkcol, obj);
TVyhPoloha.both:
Symbols.Draw(SymbolSet.IL_Symbols, derail.Pos, _S_DERAIL_B + derail.symbol, bkcol, clBlue, obj);
Symbols.Draw(SymbolSet.IL_Symbols, derail.Pos, _S_DERAIL_B + derail.symbol, bkcol, TJopColor.blue, obj);
end;
end; // for i
end;
Expand Down
8 changes: 4 additions & 4 deletions src/blocks/BlockDisconnector.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
BlockTypes;
BlockTypes, Symbols;

type
TPDisconnector = class
Expand Down Expand Up @@ -44,12 +44,12 @@ TPDisconnectors = class
end;

const
_Def_Disc_Prop: TGeneralPanelProp = (fg: clFuchsia; bg: clBlack; flash: false;);
_UA_Disc_Prop: TGeneralPanelProp = (fg: $A0A0A0; bg: clBlack; flash: false;);
_Def_Disc_Prop: TGeneralPanelProp = (fg: TJopColor.purple; bg: clBlack; flash: false;);
_UA_Disc_Prop: TGeneralPanelProp = (fg: TJopColor.grayDark; bg: clBlack; flash: false;);

implementation

uses Symbols, parseHelper;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
7 changes: 4 additions & 3 deletions src/blocks/BlockLinker.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

interface

uses Graphics, Types, Generics.Collections, IniFiles, SysUtils, DXDraws, Classes;
uses Graphics, Types, Generics.Collections, IniFiles, SysUtils, DXDraws, Classes,
Symbols;

type
TLinkerDir = (disabled = -1, zadny = 0, zakladni = 1, opacny = 2);
Expand Down Expand Up @@ -50,11 +51,11 @@ TPLinkers = class

const
_Def_Linker_Prop: TLinkerPanelProp = (fg: clBlack; bg: clFuchsia; flash: false; dir: disabled;);
_UA_Linker_Prop: TLinkerPanelProp = (fg: $A0A0A0; bg: clBlack; flash: false; dir: zadny;);
_UA_Linker_Prop: TLinkerPanelProp = (fg: TJopColor.grayDark; bg: clBlack; flash: false; dir: zadny;);

implementation

uses Symbols, parseHelper;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
8 changes: 4 additions & 4 deletions src/blocks/BlockLock.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
BlockTypes;
BlockTypes, Symbols;

type
TPLock = class
Expand Down Expand Up @@ -41,12 +41,12 @@ TPLocks = class
end;

const
_DEF_LOCK_PROP: TGeneralPanelProp = (fg: clBlack; bg: clFuchsia; flash: false;);
_UA_LOCK_PROP: TGeneralPanelProp = (fg: $A0A0A0; bg: clBlack; flash: false;);
_DEF_LOCK_PROP: TGeneralPanelProp = (fg: TJopColor.black; bg: clFuchsia; flash: false;);
_UA_LOCK_PROP: TGeneralPanelProp = (fg: TJopColor.grayDark; bg: clBlack; flash: false;);

implementation

uses Symbols, parseHelper;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
8 changes: 4 additions & 4 deletions src/blocks/BlockOther.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
BlockTypes;
BlockTypes, Symbols;

type
TPObjOther = class
Expand Down Expand Up @@ -48,12 +48,12 @@ TPObjOthers = class
end;

const
_Def_Helper_Prop: TGeneralPanelProp = (fg: $A0A0A0; bg: clBlack; flash: false;);
_Assigned_Helper_Prop: TGeneralPanelProp = (fg: clFuchsia; bg: clBlack; flash: false;);
_Def_Helper_Prop: TGeneralPanelProp = (fg: TJopColor.grayDark; bg: clBlack; flash: false;);
_Assigned_Helper_Prop: TGeneralPanelProp = (fg: TJopColor.purple; bg: clBlack; flash: false;);

implementation

uses Symbols, parseHelper, Panel;
uses parseHelper, Panel;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
8 changes: 4 additions & 4 deletions src/blocks/BlockPst.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
BlockTypes;
BlockTypes, Symbols;

type
TPPst = class
Expand Down Expand Up @@ -41,12 +41,12 @@ TPPsts = class
end;

const
_DEF_PST_PROP: TGeneralPanelProp = (fg: clBlack; bg: clFuchsia; flash: false;);
_UA_PST_PROP: TGeneralPanelProp = (fg: $A0A0A0; bg: clBlack; flash: false;);
_DEF_PST_PROP: TGeneralPanelProp = (fg: TJopColor.black; bg: clFuchsia; flash: false;);
_UA_PST_PROP: TGeneralPanelProp = (fg: TJopColor.purple; bg: clBlack; flash: false;);

implementation

uses Symbols, parseHelper;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
9 changes: 5 additions & 4 deletions src/blocks/BlockSignal.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils;
uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
Symbols;

type
TSignalPanelProp = record
Expand Down Expand Up @@ -58,12 +59,12 @@ TPSignals = class
end;

const
_DEF_SIGNAL_PROP: TSignalPanelProp = (symbol: clBlack; bg: clFuchsia; surr: clBlack; AB: false; flash: false);
_UA_SIGNAL_PROP: TSignalPanelProp = (symbol: $A0A0A0; bg: clBlack; surr: clBlack; AB: false; flash: false);
_DEF_SIGNAL_PROP: TSignalPanelProp = (symbol: TJopColor.black; bg: clFuchsia; surr: clBlack; AB: false; flash: false);
_UA_SIGNAL_PROP: TSignalPanelProp = (symbol: TJopColor.grayDark; bg: clBlack; surr: clBlack; AB: false; flash: false);

implementation

uses Symbols, parseHelper, Panel;
uses parseHelper, Panel;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
6 changes: 3 additions & 3 deletions src/blocks/BlockText.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
interface

uses Classes, Graphics, Types, Generics.Collections, IniFiles, DXDraws, SysUtils,
UITypes;
UITypes, Symbols;

type
TTextPanelProp = record
Expand Down Expand Up @@ -54,12 +54,12 @@ TPTexts = class
end;

const
_Def_Text_Prop: TTextPanelProp = (Symbol: $A0A0A0; bg: clBlack; left: clFuchsia; right: clFuchsia;
_Def_Text_Prop: TTextPanelProp = (Symbol: TJopColor.grayDark; bg: clBlack; left: clFuchsia; right: clFuchsia;
flash: false);

implementation

uses Symbols, parseHelper;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down
10 changes: 5 additions & 5 deletions src/blocks/BlockTrack.pas
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface
BlockTypes, PanelOR, DXDraws, Math;

const
_JC_END: array [0 .. 3] of TColor = (clBlack, clGreen, clWhite, clTeal);
_JC_END: array [0 .. 3] of TColor = (TJopColor.black, TJopColor.greenDark, TJopColor.white, TJopColor.turqDark);

type
TTrackTrain = record
Expand Down Expand Up @@ -173,7 +173,7 @@ procedure TPTrack.PaintTrain(pos: TPoint; spri: Integer; myORs: TList<TAreaPanel
fg := clBlack;
bg := Self.panelProp.bg;
end else
bg := clYellow;
bg := TJopColor.yellow;
end else if ((bgZaver) and (Self.panelProp.jcend > TJCType.no)) then
bg := _JC_END[Integer(Self.panelProp.jcend)]
else
Expand Down Expand Up @@ -315,16 +315,16 @@ procedure TTrackPanelProp.InitDefault();
Self.flash := false;
Self.fg := clFuchsia;
Self.bg := clBlack;
Self.notColorBranches := $A0A0A0;
Self.notColorBranches := TJopColor.grayDark;
Self.jcend := no;
end;

procedure TTrackPanelProp.InitUA();
begin
Self.flash := false;
Self.fg := $A0A0A0;
Self.fg := TJopColor.grayDark;
Self.bg := clBlack;
Self.notColorBranches := $A0A0A0;
Self.notColorBranches := TJopColor.grayDark;
Self.jcend := no;
end;

Expand Down
11 changes: 6 additions & 5 deletions src/blocks/BlockTurnout.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

interface

uses Classes, Graphics, Types, SysUtils, DXDraws, Generics.Collections, BlockTrack;
uses Classes, Graphics, Types, SysUtils, DXDraws, Generics.Collections, BlockTrack,
Symbols;

type
TVyhPoloha = (disabled = -5, none = -1, plus = 0, minus = 1, both = 2);
Expand Down Expand Up @@ -35,12 +36,12 @@ TPTurnout = class
end;

const
_DEF_TURNOUT_PROP: TTurnoutPanelProp = (flash: false; fg: clFuchsia; bg: clBlack; position: TVyhPoloha.disabled);
_UA_TURNOUT_PROP: TTurnoutPanelProp = (flash: false; fg: $A0A0A0; bg: clBlack; position: TVyhPoloha.both);
_DEF_TURNOUT_PROP: TTurnoutPanelProp = (flash: false; fg: TJopColor.purple; bg: clBlack; position: TVyhPoloha.disabled);
_UA_TURNOUT_PROP: TTurnoutPanelProp = (flash: false; fg: TJopColor.grayDark; bg: clBlack; position: TVyhPoloha.both);

implementation

uses parseHelper, Symbols;
uses parseHelper;

/// /////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -107,7 +108,7 @@ procedure TPTurnout.Show(obj: TDXDraw; blik: boolean; useky: TList<TPTrack>);
end;
TVyhPoloha.both:
begin
Symbols.Draw(SymbolSet.IL_Symbols, Self.position, Self.symbolID, bkcol, clBlue, obj);
Symbols.Draw(SymbolSet.IL_Symbols, Self.position, Self.symbolID, bkcol, TJopColor.blue, obj);
end;
end;
end;
Expand Down
4 changes: 3 additions & 1 deletion src/forms/fPotvrSekv.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object F_PotvrSekv: TF_PotvrSekv
Height = 361
Align = alTop
BevelOuter = bvNone
Color = 10526880
Color = clSilver
ParentBackground = False
TabOrder = 2
object L_ListDescription: TLabel
Expand Down Expand Up @@ -144,11 +144,13 @@ object F_PotvrSekv: TF_PotvrSekv
Top = 16
Width = 17
Height = 105
Color = clSilver
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Fixedsys'
Font.Style = []
ParentColor = False
ParentFont = False
end
object PB_podm_Indexes: TPaintBox
Expand Down
16 changes: 8 additions & 8 deletions src/forms/fPotvrSekv.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ interface

uses
Windows, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Generics.Collections;
Dialogs, ExtCtrls, StdCtrls, Generics.Collections, Symbols;

const
_POTVR_TIMEOUT_MIN = 2;
_POTVR_ITEMS_PER_PAGE = 13;
_FG_COLOR = $A0A0A0;
_FG_COLOR = TJopColor.gray;
_SYMBOL_HEIGHT = 15;
_SYMBOL_WIDTH = 8;

Expand Down Expand Up @@ -269,7 +269,7 @@ procedure TF_PotvrSekv.ShowTexts();

with (Self.PB_SFP.canvas) do
begin
Font.color := clWhite;
Font.color := TJopColor.white;
TextOut(2 * _SYMBOL_WIDTH, 0, Self.m_station);
TextOut(2 * _SYMBOL_WIDTH, _SYMBOL_HEIGHT, ' ' + Self.m_event);
Font.color := _FG_COLOR;
Expand All @@ -295,7 +295,7 @@ procedure TF_PotvrSekv.ShowTexts();
if (Self.m_conditions[podm_start + i].condition <> '') then
TextOut(30 * _SYMBOL_WIDTH, (i * _SYMBOL_HEIGHT), '# ' + Self.m_conditions[podm_start + i].condition);
end;
Font.color := clWhite;
Font.color := TJopColor.white;

if (podm_start + podm_count >= Self.m_conditions.Count) then
TextOut(2 * _SYMBOL_WIDTH, (podm_count * _SYMBOL_HEIGHT), 'KONEC SEZNAMU')
Expand All @@ -316,8 +316,8 @@ procedure TF_PotvrSekv.ShowFlashing();
begin
for var i := 0 to Self.m_senders.Count + 1 do
begin
first := IfThen(Self.m_flash, clBlack, $A0A0A0);
second := IfThen(Self.m_flash, $A0A0A0, clBlack);
first := IfThen(Self.m_flash, clBlack, _FG_COLOR);
second := IfThen(Self.m_flash, _FG_COLOR, clBlack);
FillRectangle(Self.PB_SFP.canvas, rect(0, i * _SYMBOL_HEIGHT, _SYMBOL_WIDTH,
i * _SYMBOL_HEIGHT + (_SYMBOL_HEIGHT div 2) - 1), first);
FillRectangle(Self.PB_SFP.canvas, rect(0, i * _SYMBOL_HEIGHT + (_SYMBOL_HEIGHT div 2), _SYMBOL_WIDTH,
Expand All @@ -333,8 +333,8 @@ procedure TF_PotvrSekv.ShowFlashing();
begin
for var i := 0 to podm_count do
begin
first := IfThen(Self.m_flash, clBlack, $A0A0A0);
second := IfThen(Self.m_flash, $A0A0A0, clBlack);
first := IfThen(Self.m_flash, clBlack, _FG_COLOR);
second := IfThen(Self.m_flash, _FG_COLOR, clBlack);
FillRectangle(Self.PB_Podm.canvas, rect(0, i * _SYMBOL_HEIGHT, _SYMBOL_WIDTH,
i * _SYMBOL_HEIGHT + (_SYMBOL_HEIGHT div 2) - 1), first);
FillRectangle(Self.PB_Podm.canvas, rect(0, i * _SYMBOL_HEIGHT + (_SYMBOL_HEIGHT div 2), _SYMBOL_WIDTH,
Expand Down
8 changes: 5 additions & 3 deletions src/forms/fStitVyl.pas
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TF_StitVyl = class(TForm)

implementation

uses RPConst, fMain;
uses RPConst, fMain, Symbols;

{$R *.dfm}

Expand All @@ -54,8 +54,9 @@ procedure TF_StitVyl.OpenFormStit(callback: TStitVylCallback; blk, stit: string)
Self.OpenBlk := blk;

Self.Caption := 'Štítek na bloku ' + blk;
Self.L_What.Font.Color := clBlack;
Self.L_What.Caption := 'Štítek :';
Self.Color := clTeal;
Self.Color := TJopColor.turqDark;
Self.E_Popisek.Text := stit;

Self.Show();
Expand All @@ -68,8 +69,9 @@ procedure TF_StitVyl.OpenFormVyl(callback: TStitVylCallback; blk, vyl: string);
Self.OpenBlk := blk;

Self.Caption := 'Výluka na bloku ' + blk;
Self.L_What.Font.Color := clWhite;
Self.L_What.Caption := 'Výluka :';
Self.Color := clOlive;
Self.Color := TJopColor.brown;
Self.E_Popisek.Text := vyl;

Self.Show();
Expand Down
1 change: 1 addition & 0 deletions src/hJOPpanel.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_Keys>CompanyName=;FileDescription=hJOPpanel;FileVersion=1.16.3.0;InternalName=hJOPpanel.exe;LegalCopyright=Jan Horáček;LegalTrademarks=Jan Horáček;OriginalFilename=hJOPpanel.exe;ProductName=hJOPpanel;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Release>3</VerInfo_Release>
<Debugger_RunParams>panely/Na-Iv.ini</Debugger_RunParams>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
Expand Down
Loading

0 comments on commit 3fb82f2

Please sign in to comment.