|
4 | 4 | <MudDialogProvider />
|
5 | 5 | <MudSnackbarProvider />
|
6 | 6 |
|
7 |
| -<MudLayout Style="height: 100%; width: 100%"> |
| 7 | +<MudLayout Style="height: 100vh; width: 100%; overflow: hidden"> |
8 | 8 | <MudAppBar Elevation="1">
|
9 | 9 | <MudButton OnClick="Save" Class="ml-3">Save</MudButton>
|
10 | 10 | <MudButton OnClick="Add" Class="ml-3">Add node</MudButton>
|
|
13 | 13 | <MudSpacer />
|
14 | 14 | <MudIconButton Icon="@Icons.Material.Filled.MoreVert" Color="Color.Inherit" Edge="Edge.End" />
|
15 | 15 | </MudAppBar>
|
16 |
| - <MudMainContent Style="width: 100%; height: 100%"> |
| 16 | + <MudMainContent Style="width: 100%; height: 100%; overflow-y: hidden"> |
17 | 17 |
|
18 |
| - <MudExtensions.MudSplitter EnableSlide="true" Sensitivity="0.01" @bind-Dimension="GraphPercentage" OnDoubleClicked="@(_ => GraphPercentage = 100)" Class="h100 overflow-hidden" Style="overflow-y: hidden"> |
| 18 | + <MudExtensions.MudSplitter EnableSlide="true" Sensitivity="0.01" @bind-Dimension="ProjectExplorerGraphPercentage" Class="wh100 overflow-hidden"> |
19 | 19 | <StartContent>
|
20 |
| - <MudStack Row="true" Class="wh100 pa-1 relative"> |
21 |
| - |
22 |
| - |
23 |
| - <MudTabs Elevation="2" Rounded="true" ApplyEffectsToContainer="true" PanelClass="pa-2 h100" KeepPanelsAlive="true" Style="width: 25%; height: 100%"> |
24 |
| - <MudTabPanel Text="Project"> |
25 |
| - <ProjectExplorer Project="Project" @bind-SelectedClass="SelectedClass"></ProjectExplorer> |
26 |
| - </MudTabPanel> |
27 |
| - <MudTabPanel Text="Class"> |
28 |
| - @if (SelectedClass != null) |
29 |
| - { |
30 |
| - <ClassExplorer @key="SelectedClass" Class="SelectedClass" SelectedMethodChanged="OpenMethod"></ClassExplorer> |
31 |
| - } |
32 |
| - </MudTabPanel> |
33 |
| - </MudTabs> |
34 |
| - |
35 |
| - @* The 'relative' div is used to control the "Open/Close" icon for the debugger console panel as well as the source viewer open icon *@ |
36 |
| - <div class="w100 relative flex-1"> |
| 20 | + <MudTabs Elevation="2" Rounded="true" ApplyEffectsToContainer="true" PanelClass="pa-2 wh100" KeepPanelsAlive="true" Class="wh100"> |
| 21 | + <MudTabPanel Text="Project"> |
| 22 | + <ProjectExplorer Project="Project" @bind-SelectedClass="SelectedClass"></ProjectExplorer> |
| 23 | + </MudTabPanel> |
| 24 | + <MudTabPanel Text="Class"> |
| 25 | + @if (SelectedClass != null) |
| 26 | + { |
| 27 | + <ClassExplorer @key="SelectedClass" Class="SelectedClass" SelectedMethodChanged="OpenMethod"></ClassExplorer> |
| 28 | + } |
| 29 | + </MudTabPanel> |
| 30 | + </MudTabs> |
| 31 | + </StartContent> |
37 | 32 |
|
38 |
| - <MudStack Row="false" Class="wh100"> |
| 33 | + <EndContent> |
| 34 | + <MudExtensions.MudSplitter Class="wh100 pa-1 relative overflow-y-hidden" @bind-Dimension="SourceViewerGraphPercentage" OnDoubleClicked="@(_ => SourceViewerGraphPercentage = 100)"> |
| 35 | + <StartContent> |
| 36 | + @* The 'relative' div is used to control the "Open/Close" icon for the debugger console panel as well as the source viewer open icon *@ |
| 37 | + <div class="wh100 relative flex-1 overflow-y-hidden"> |
39 | 38 |
|
40 |
| - <DebuggedPathView OpenMethod="OpenMethodFromDebuggedPath" /> |
| 39 | + <MudStack Row="false" Class="wh100"> |
41 | 40 |
|
42 |
| - <CascadingValue Value="this" IsFixed="true"> |
43 |
| - <MudTabs @ref="Tabs" Elevation="2" Rounded="true" ApplyEffectsToContainer="true" PanelClass="pa-2 wh100" KeepPanelsAlive="true" Class="wh100" @bind-ActivePanelIndex="ActivePanelIndex"> |
44 |
| - @foreach (var method in OpenedMethods) |
45 |
| - { |
46 |
| - <MudTabPanel ID="method" @key="method" Text="@method.Name"> |
47 |
| - <GraphCanvas @key="method.Graph" Graph="method.Graph"></GraphCanvas> |
48 |
| - </MudTabPanel> |
49 |
| - } |
50 |
| - </MudTabs> |
51 |
| - </CascadingValue> |
| 41 | + <DebuggedPathView OpenMethod="OpenMethodFromDebuggedPath" /> |
52 | 42 |
|
53 |
| - <DebuggerConsolePanel Project="Project" /> |
| 43 | + <CascadingValue Value="this" IsFixed="true"> |
| 44 | + <MudTabs @ref="Tabs" Elevation="2" Rounded="true" ApplyEffectsToContainer="true" PanelClass="pa-2 wh100" KeepPanelsAlive="true" Class="wh100" @bind-ActivePanelIndex="ActivePanelIndex"> |
| 45 | + @foreach (var method in OpenedMethods) |
| 46 | + { |
| 47 | + <MudTabPanel ID="method" @key="method" Text="@method.Name"> |
| 48 | + <GraphCanvas @key="method.Graph" Graph="method.Graph"></GraphCanvas> |
| 49 | + </MudTabPanel> |
| 50 | + } |
| 51 | + </MudTabs> |
| 52 | + </CascadingValue> |
54 | 53 |
|
55 |
| - </MudStack> |
| 54 | + <DebuggerConsolePanel Project="Project" /> |
56 | 55 |
|
57 |
| - </div> |
| 56 | + </MudStack> |
58 | 57 |
|
59 |
| - <div class="h100 absolute d-flex" style="right: 0px"> |
60 |
| - @{ |
61 |
| - var close = GraphPercentage <= 75; |
62 |
| - var icon = close ? Icons.Material.Filled.ArrowRight : Icons.Material.Filled.ArrowLeft; |
63 |
| - } |
64 |
| - <MudIconButton Icon="@icon" OnClick="@(() => GraphPercentage = close ? 100 : 75)" Style="margin-top: auto; margin-bottom: auto" /> |
65 |
| - </div> |
| 58 | + </div> |
66 | 59 |
|
67 |
| - </MudStack> |
| 60 | + <div class="h100 absolute d-flex" style="right: 0px"> |
| 61 | + <MudIconButton Icon="@(SourceViewerGraphPercentage <= 75 ? Icons.Material.Filled.ArrowRight : Icons.Material.Filled.ArrowLeft)" OnClick="SwitchSourceViewerGraph" Style="margin-top: auto; margin-bottom: auto" /> |
| 62 | + </div> |
68 | 63 |
|
69 |
| - </StartContent> |
| 64 | + </StartContent> |
70 | 65 |
|
71 |
| - <EndContent> |
72 |
| - <SourceViewer Method="@(OpenedMethods.Count > 0 ? OpenedMethods[ActivePanelIndex] : null)" IsVisible="@(GraphPercentage != 100)" /> |
| 66 | + <EndContent> |
| 67 | + <SourceViewer Method="@(OpenedMethods.Count > 0 ? OpenedMethods[ActivePanelIndex] : null)" IsVisible="@(SourceViewerGraphPercentage != 100)" /> |
| 68 | + </EndContent> |
| 69 | + </MudExtensions.MudSplitter> |
73 | 70 | </EndContent>
|
74 | 71 |
|
75 | 72 | </MudExtensions.MudSplitter>
|
|
88 | 85 |
|
89 | 86 | private int ActivePanelIndex = 0;
|
90 | 87 |
|
91 |
| - private double GraphPercentage = 100; |
| 88 | + private double SourceViewerGraphPercentage = 100; |
| 89 | + private double SourceOpenedGraphPercentage = 75; |
| 90 | + private double ProjectExplorerGraphPercentage = 18; |
92 | 91 |
|
93 | 92 | protected override void OnInitialized()
|
94 | 93 | {
|
|
100 | 99 | DebuggedPathService.ChangeProject(Project);
|
101 | 100 | }
|
102 | 101 |
|
| 102 | + private void SwitchSourceViewerGraph() |
| 103 | + { |
| 104 | + if (SourceViewerGraphPercentage <= 75) |
| 105 | + { |
| 106 | + SourceOpenedGraphPercentage = SourceViewerGraphPercentage; |
| 107 | + SourceViewerGraphPercentage = 100; |
| 108 | + } |
| 109 | + else |
| 110 | + { |
| 111 | + SourceViewerGraphPercentage = SourceOpenedGraphPercentage; |
| 112 | + } |
| 113 | + } |
| 114 | + |
103 | 115 | public void OpenMethodFromDebuggedPath(Core.Class.NodeClassMethod? method)
|
104 | 116 | {
|
105 | 117 | if (method == null)
|
|
0 commit comments