Permalink
Browse files

Delphi theme support.

Last commit in Google code
  • Loading branch information...
pyscripter
pyscripter committed Aug 24, 2015
1 parent b2116f5 commit 8cb9fbdc41cc983fbfa0ab395c52ad6152d976d3
Showing with 60,293 additions and 51,375 deletions.
  1. +120 −60 Components/JvDockVSNetStyleSpTBX.pas
  2. +29 −3 PyScripter.dpr
  3. +320 −5 PyScripter.dproj
  4. BIN PyScripter.res
  5. +3 −0 Readme.txt
  6. +962 −0 SpTBXPageScroller.pas
  7. +4,025 −0 SpTBXSkins.pas
  8. +23 −23 StringResources.pas
  9. +16 −13 SynCompletionProposal.pas
  10. +12 −10 SynHighlighterPython.pas
  11. +2 −2 SynHighlighterYAML.pas
  12. +35,563 −38,677 VirtualTrees.pas
  13. +2 −2 cCodeCompletion.pas
  14. +13 −7 cCodeHint.pas
  15. +3 −2 cPyRemoteDebugger.pas
  16. +24 −6 cThemedVirtualStringTree.pas
  17. +94 −80 dlgAboutPyScripter.dfm
  18. +1 −0 dlgCodeTemplates.dfm
  19. +3 −3 dlgCodeTemplates.pas
  20. +1 −1 dlgConfigureTools.dfm
  21. +2 −2 dlgConfigureTools.pas
  22. +1 −0 dlgCustomParams.dfm
  23. +1 −1 dlgCustomParams.pas
  24. +1 −0 dlgFileTemplates.dfm
  25. +3 −3 dlgFileTemplates.pas
  26. +1 −5 dlgNewFile.dfm
  27. +9 −10 dlgOptionsEditor.dfm
  28. +61 −0 dlgOptionsEditor.pas
  29. +5 −4 dlgPickList.dfm
  30. +5 −1 dlgRunConfiguration.dfm
  31. +12 −2 dlgRunConfiguration.pas
  32. +387 −477 dlgSynPageSetup.dfm
  33. +1 −1 dlgSynPageSetup.pas
  34. +1 −1 dlgSynPrintPreview.dfm
  35. +1 −1 dlgSynPrintPreview.pas
  36. +12 −9 dlgToolProperties.dfm
  37. +1 −1 dlgToolProperties.pas
  38. +140 −139 dmCommands.dfm
  39. +2 −4 dmCommands.pas
  40. +54 −48 frmBreakPoints.dfm
  41. +2 −8 frmBreakPoints.pas
  42. +61 −48 frmCallStack.dfm
  43. +3 −8 frmCallStack.pas
  44. +1 −6 frmCodeExplorer.pas
  45. +32 −26 frmCommandOutput.dfm
  46. +4 −3 frmCommandOutput.pas
  47. +1 −1 frmDisassemlyView.dfm
  48. +174 −144 frmEditor.dfm
  49. +10 −8 frmEditor.pas
  50. +5 −4 frmFileExplorer.dfm
  51. +2 −7 frmFileExplorer.pas
  52. +1 −1 frmFunctionList.pas
  53. +26 −17 frmIDEDockWin.dfm
  54. +17 −11 frmIDEDockWin.pas
  55. +110 −103 frmMessages.dfm
  56. +2 −8 frmMessages.pas
  57. +90 −88 frmProjectExplorer.dfm
  58. +5 −9 frmProjectExplorer.pas
  59. +4 −386 frmPyIDEMain.dfm
  60. +73 −73 frmPyIDEMain.pas
  61. +96 −103 frmRegExpTester.dfm
  62. +10 −16 frmRegExpTester.pas
  63. +114 −112 frmToDo.dfm
  64. +3 −8 frmToDo.pas
  65. +23 −24 frmUnitTests.dfm
  66. +8 −14 frmUnitTests.pas
  67. +3 −1 frmVariables.dfm
  68. +26 −39 frmVariables.pas
  69. +1 −9 frmWatches.pas
  70. +7,003 −0 locale/de/default.po
  71. +52 −0 locale/de/languages.po
  72. +7,108 −7,151 locale/fr/LC_MESSAGES/default.po
  73. +3,278 −3,328 locale/zh/LC_MESSAGES/default.po
  74. +29 −8 uCommonFunctions.pas
@@ -190,10 +190,10 @@ procedure TJvDockVSNETTreeSpTBX.DrawAutoHideButton(Zone: TJvDockZone; Left,
SkinState : TSpTBXSkinStatesType;
R : TRect;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
if Zone <> nil then
begin
@@ -212,7 +212,8 @@ procedure TJvDockVSNETTreeSpTBX.DrawAutoHideButton(Zone: TJvDockZone; Left,
PatternColor := clCaptionText;
end else begin
SkinState := CurrentSkin.GetState(True, AZone.AutoHideBtnState = bsDown, AZone.AutoHideBtnState = bsUp, False);
- CurrentSkin.PaintBackground(Canvas, R, skncToolbarItem, SkinState, True, True);
+ //CurrentSkin.PaintBackground(Canvas, R, skncToolbarItem, SkinState, True, True);
+ SpDrawXPToolbarButton(Canvas, R, SkinState);
PatternColor := CurrentSkin.GetTextColor(skncToolbarItem, SkinState);
end;
@@ -234,10 +235,10 @@ procedure TJvDockVSNETTreeSpTBX.DrawCloseButton(Canvas: TCanvas;
SkinState : TSpTBXSkinStatesType;
R : TRect;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
if Zone <> nil then
begin
@@ -265,7 +266,8 @@ procedure TJvDockVSNETTreeSpTBX.DrawCloseButton(Canvas: TCanvas;
PatternColor := clCaptionText;
end else begin
SkinState := CurrentSkin.GetState(True, AZone.CloseBtnState = bsDown, AZone.CloseBtnState = bsUp, False);
- CurrentSkin.PaintBackground(Canvas, R, skncToolbarItem, SkinState, True, True);
+ SpDrawXPToolbarButton(Canvas, R, SkinState);
+ //CurrentSkin.PaintBackground(Canvas, R, skncToolbarItem, SkinState, True, True);
PatternColor := CurrentSkin.GetTextColor(skncToolbarItem, SkinState);
end;
SpDrawGlyphPattern(Canvas, R, 0, PatternColor);
@@ -285,10 +287,10 @@ procedure TJvDockVSNETTreeSpTBX.DrawDockGrabber(Control: TWinControl;
TextColor: TColor;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
Assert(Assigned(Control));
ShowCloseButtonOnGrabber := True;
@@ -319,6 +321,7 @@ procedure TJvDockVSNETTreeSpTBX.DrawDockGrabber(Control: TWinControl;
CRect := DrawRect;
// Draw Background
+ SpDrawXPDock(Canvas, ARect);
SpDrawXPDockablePanelTitleBar(Canvas, DrawRect, False, False);
if ShowCloseButtonOnGrabber then
@@ -349,6 +352,25 @@ procedure TJvDockVSNETTreeSpTBX.DrawDockGrabber(Control: TWinControl;
DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX or DT_END_ELLIPSIS);
end;
+procedure PaintSplitterFrame(Canvas : TCanvas; IsVertical: Boolean; var R: TRect);
+var
+ FrameBrush: HBRUSH;
+begin
+ //Exit;
+ if IsVertical then
+ InflateRect(R, -1, 2)
+ else
+ InflateRect(R, 2, -1);
+ OffsetRect(R, 1, 1);
+ FrameBrush := CreateSolidBrush(ColorToRGB(CurrentSkin.GetThemedSystemColor(clBtnHighlight)));
+ FrameRect(Canvas.Handle, R, FrameBrush);
+ DeleteObject(FrameBrush);
+ OffsetRect(R, -2, -2);
+ FrameBrush := CreateSolidBrush(ColorToRGB(CurrentSkin.GetThemedSystemColor(clBtnShadow)));
+ FrameRect(Canvas.Handle, R, FrameBrush);
+ DeleteObject(FrameBrush);
+end;
+
procedure TJvDockVSNETTreeSpTBX.DrawSplitterRect(const ARect: TRect);
@@ -369,15 +391,23 @@ procedure TJvDockVSNETTreeSpTBX.DrawSplitterRect(const ARect: TRect);
C1, C2 : TColor;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
IsVertical := ARect.Right - ARect.Left < ARect.Bottom - ARect.Top;
// Paint background
- CurrentSkin.PaintBackground(Canvas, ARect, skncSplitter, sknsNormal, True, False, IsVertical);
+ if SkinManager.GetSkinType = sknSkin then
+ CurrentSkin.PaintBackground(Canvas, ARect, skncSplitter, sknsNormal, True,
+ False, IsVertical)
+ else begin
+ Canvas.Brush.Color := CurrentSkin.GetThemedSystemColor(clBtnFace);
+ Canvas.FillRect(ARect);
+ PaintSplitterFrame(Canvas, IsVertical, R);
+ end;
+
// Paint grip
R := GetGripRect(ARect, IsVertical);
@@ -387,11 +417,18 @@ procedure TJvDockVSNETTreeSpTBX.DrawSplitterRect(const ARect: TRect);
else
InflateRect(DragHandleR, -10, -1);
- if Assigned(SizingZone) then
- CurrentSkin.PaintBackground(Canvas, R, skncButton, sknsNormal, True, True, False, [akLeft, akTop, akRight, akBottom]);
- C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1;
- C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2;
+ if SkinManager.GetSkinType = sknSkin then begin
+ if Assigned(SizingZone) then
+ CurrentSkin.PaintBackground(Canvas, R, skncButton, sknsNormal, True, True, False, [akLeft, akTop, akRight, akBottom]);
+ C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1;
+ C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2;
+ end
+ else begin
+ C1 := CurrentSkin.GetThemedSystemColor(clBtnShadow);
+ C2 := CurrentSkin.GetThemedSystemColor(clWindow);
+ end;
SpDrawXPGrip(Canvas, DragHandleR, C1, C2);
+
end;
procedure TJvDockVSNETTreeSpTBX.SyncWithStyle;
@@ -425,7 +462,7 @@ procedure TJvDockVSNETTreeSpTBX.WMSpSkinChange(var Message: TMessage);
begin
UpdateAll;
DockSite.Invalidate;
- if SkinManager.IsDefaultSkin then
+ if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then
ButtonWidth := 16
else
ButtonWidth := 14
@@ -585,17 +622,17 @@ procedure TJvDockVSNETTabPanelSpTBX.Paint;
I, CompleteWidth: Integer;
ImageWidth: Integer;
CaptionString: string;
- Edge: TSpTBXTabEdge;
+// Edge: TSpTBXTabEdge;
Position: TSpTBXTabPosition;
IsActive, IsHot : Boolean;
State : TSpTBXSkinStatesType;
TextColor: TColor;
Format : UINT;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
if Page = nil then
Exit;
@@ -625,14 +662,15 @@ procedure TJvDockVSNETTabPanelSpTBX.Paint;
end;
// Paint the toolbar background
- CurrentSkin.PaintBackground(Canvas, DockRect, skncDock, sknsNormal, True, False);
- CurrentSkin.PaintBackground(Canvas, DockRect, skncToolbar, sknsNormal, True, False);
+ //CurrentSkin.PaintBackground(Canvas, DockRect, skncDock, sknsNormal, True, False);
+ //CurrentSkin.PaintBackground(Canvas, DockRect, skncToolbar, sknsNormal, True, False);
+ SpDrawXPTabControlBackground(Canvas, DockRect, clBtnFace, Position = ttpBottom);
CompleteWidth := TabLeftOffset;
// Paint all the tabs
Canvas.Font.Assign(ToolbarFont);
- Edge := tedLeft; // Only for the first visible tab
+// Edge := tedLeft; // Only for the first visible tab
for I := 0 to Page.Count - 1 do
begin
@@ -654,7 +692,7 @@ procedure TJvDockVSNETTabPanelSpTBX.Paint;
IsActive := Page.ActivePageIndex = I;
IsHot := Page.HotTrack and (FSelectHotIndex = I);
- if IsActive or IsHot or
+ if IsActive or IsHot or (SkinManager.GetSkinType = sknDelphiStyle) or
not CurrentSkin.Options(skncTab, sknsNormal).Body.IsEmpty or
not CurrentSkin.Options(skncTab, sknsNormal).Borders.IsEmpty then
begin
@@ -665,20 +703,20 @@ procedure TJvDockVSNETTabPanelSpTBX.Paint;
Inc(R.Bottom, 5);
// maintain background border
if IsActive then begin
- SpDrawXPTab(Canvas, R, True, IsActive, False, False, Position, Edge);
+ SpDrawXPTab(Canvas, R, True, IsActive, False, False, Position, tedNone);
ExcludeClipRect(Canvas.Handle, R.Left+1, ARect.Bottom - TabSheetBorderSize, R.Right-1, ARect.Bottom);
end;
end;
ttpBottom:
begin
Dec(R.Top, 5);
if IsActive then begin
- SpDrawXPTab(Canvas, R, True, IsActive, False, False, Position, Edge);
+ SpDrawXPTab(Canvas, R, True, IsActive, False, False, Position, tedNone);
ExcludeClipRect(Canvas.Handle, R.Left+1, 0, R.Right-1, TabSheetBorderSize);
end;
end;
end;
- SpDrawXPTab(Canvas, R, True, IsActive, IsHot, False, Position, Edge);
+ SpDrawXPTab(Canvas, R, True, IsActive, IsHot, False, Position, tedNone);
end
else begin
// Draw the separators
@@ -690,7 +728,7 @@ procedure TJvDockVSNETTabPanelSpTBX.Paint;
CompleteWidth + CurrTabWidth + 4,
PanelHeight - TabBottomOffset), False, True);
end;
- Edge := tedNone;
+// Edge := tedNone;
// now paint the caption
Format := DT_LEFT or DT_SINGLELINE or DT_END_ELLIPSIS;
@@ -788,16 +826,23 @@ procedure TJvDockVSNETPanelSpTBX.OnPaintSplitter(Sender: TObject);
R : TRect;
IsVertical : Boolean;
begin
- if SkinManager.GetSkinType <> sknSkin then Exit;
+ //if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then Exit;
if Assigned(Sender) and (Sender is TJvDockVSPopupPanelSplitter) then
with TJvDockVSPopupPanelSplitter(Sender) do begin
R := ClientRect;
IsVertical := R.Right - R.Left < R.Bottom - R.Top;
// Paint background
- CurrentSkin.PaintBackground(Canvas, R, skncSplitter, sknsNormal,
- True, False, IsVertical);
+ if SkinManager.GetSkinType = sknSkin then
+ CurrentSkin.PaintBackground(Canvas, R, skncSplitter, sknsNormal,
+ True, False, IsVertical)
+ else begin
+ Canvas.Brush.Color := CurrentSkin.GetThemedSystemColor(clBtnFace);
+ Canvas.FillRect(R);
+
+ PaintSplitterFrame(Canvas, IsVertical, R);
+ end;
end;
end;
@@ -932,13 +977,14 @@ procedure TJvDockVSChannelSpTBX.Paint;
end;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
IsVertical := Align in [alLeft, alRight];
- CurrentSkin.PaintBackground(Canvas, ClientRect, skncDock, sknsNormal, True, True, IsVertical);
+ SpDrawXPDock(Canvas, ClientRect, IsVertical);
+ //CurrentSkin.PaintBackground(Canvas, ClientRect, skncDock, sknsNormal, True, True, IsVertical);
CurrentPos := BlockStartOffset;
for I := 0 to BlockCount - 1 do
@@ -1051,15 +1097,23 @@ procedure TJvDockVSNETSplitterSpTBX.Paint;
IsVertical : Boolean;
C1, C2 : TColor;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
IsVertical := Align in [alLeft, alRight];
// Paint background
- CurrentSkin.PaintBackground(Canvas, ClientRect, skncSplitter, sknsNormal, True, False, IsVertical);
+ if SkinManager.GetSkinType = sknSkin then
+ CurrentSkin.PaintBackground(Canvas, ClientRect, skncSplitter, sknsNormal,
+ True, False, IsVertical)
+ else begin
+ Canvas.Brush.Color := CurrentSkin.GetThemedSystemColor(clBtnFace);
+ Canvas.FillRect(ClientRect);
+
+ PaintSplitterFrame(Canvas, IsVertical, R);
+ end;
// Paint grip
R := GetGripRect(IsVertical);
@@ -1069,11 +1123,17 @@ procedure TJvDockVSNETSplitterSpTBX.Paint;
else
InflateRect(DragHandleR, -10, -1);
- if FMouseLoc in [mlOver, mlDown] then
- CurrentSkin.PaintBackground(Canvas, R, skncButton, sknsNormal, True, True, False, [akLeft, akTop, akRight, akBottom]);
- C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1;
- C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2;
- SpDrawXPGrip(Canvas, DragHandleR, C1, C2);
+ if SkinManager.GetSkinType = sknSkin then begin
+ if FMouseLoc in [mlOver, mlDown] then
+ CurrentSkin.PaintBackground(Canvas, R, skncButton, sknsNormal, True, True, False, [akLeft, akTop, akRight, akBottom]);
+ C1 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color1;
+ C2 := SkinManager.CurrentSkin.Options(skncToolbarGrip).Body.Color2;
+ end
+ else begin
+ C1 := CurrentSkin.GetThemedSystemColor(clBtnShadow);
+ C2 := CurrentSkin.GetThemedSystemColor(clWindow);
+ end;
+ SpDrawXPGrip(Canvas, DragHandleR, C1, C2);
// //uncomment this is you want the dotted frame drawn at designtime
// if csDesigning in ComponentState then
@@ -1133,7 +1193,7 @@ procedure TJvDockVSNETSpTBXConjoinServerOption.UpdateDefaultSystemCaptionInfo;
procedure TJvDockVSNETTabSheetSpTBX.AdjustClientRect(var Rect: TRect);
begin
- if Assigned(PageControl) and (SkinManager.GetSkinType = sknSkin) then begin
+ if Assigned(PageControl) {and (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle])} then begin
InflateRect(Rect, -TabSheetBorderSize, -TabSheetBorderSize);
if (PageControl as TJvDockVSNETTabPageControlSpTBX).TabPosition = tpBottom then
Inc(Rect.Bottom, TabSheetBorderSize)
@@ -1148,10 +1208,10 @@ procedure TJvDockVSNETTabSheetSpTBX.WMEraseBkgnd(var Message: TMessage);
R: TRect;
ACanvas: TCanvas;
begin
- if SkinManager.GetSkinType <> sknSkin then begin
- inherited;
- Exit;
- end;
+// if not (SkinManager.GetSkinType in [sknSkin, sknDelphiStyle]) then begin
+// inherited;
+// Exit;
+// end;
if not DoubleBuffered or (Message.wParam = WPARAM(Message.lParam)) then begin
if not (csDestroying in ComponentState) then begin
Oops, something went wrong.

0 comments on commit 8cb9fbd

Please sign in to comment.