optimized UI
This commit is contained in:
@@ -161,7 +161,7 @@ namespace clashN.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EditProfile(bool blNew)
|
public void EditProfile(bool blNew)
|
||||||
{
|
{
|
||||||
ProfileItem item;
|
ProfileItem item;
|
||||||
if (blNew)
|
if (blNew)
|
||||||
|
|||||||
@@ -25,16 +25,13 @@
|
|||||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
VerticalScrollBarVisibility="Auto">
|
VerticalScrollBarVisibility="Auto">
|
||||||
<Grid>
|
<Grid Margin="8">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid
|
<Grid x:Name="gridText" Grid.Row="0">
|
||||||
x:Name="gridText"
|
|
||||||
Grid.Row="0"
|
|
||||||
Margin="8">
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace clashN.Views
|
|||||||
ViewModel = new ProfilesViewModel();
|
ViewModel = new ProfilesViewModel();
|
||||||
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(ProfilesViewModel));
|
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(ProfilesViewModel));
|
||||||
|
|
||||||
|
lstProfiles.PreviewMouseDoubleClick += lstProfiles_PreviewMouseDoubleClick;
|
||||||
lstProfiles.PreviewMouseLeftButtonDown += LstProfiles_PreviewMouseLeftButtonDown;
|
lstProfiles.PreviewMouseLeftButtonDown += LstProfiles_PreviewMouseLeftButtonDown;
|
||||||
lstProfiles.MouseMove += LstProfiles_MouseMove;
|
lstProfiles.MouseMove += LstProfiles_MouseMove;
|
||||||
lstProfiles.DragEnter += LstProfiles_DragEnter;
|
lstProfiles.DragEnter += LstProfiles_DragEnter;
|
||||||
@@ -93,6 +94,11 @@ namespace clashN.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void lstProfiles_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ViewModel?.EditProfile(false);
|
||||||
|
}
|
||||||
|
|
||||||
#region Drag and Drop
|
#region Drag and Drop
|
||||||
|
|
||||||
private Point startPoint = new Point();
|
private Point startPoint = new Point();
|
||||||
@@ -186,5 +192,6 @@ namespace clashN.Views
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,9 +58,9 @@
|
|||||||
DockPanel.Dock="Top"
|
DockPanel.Dock="Top"
|
||||||
Style="{StaticResource ListItemTitle}"
|
Style="{StaticResource ListItemTitle}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsSaveTip}" />
|
Text="{x:Static resx:ResUI.TbSettingsSaveTip}" />
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<TabControl>
|
||||||
<TabControl>
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<Grid Grid.Row="1" Margin="8">
|
<Grid Grid.Row="1" Margin="8">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -205,9 +205,10 @@
|
|||||||
Content="{x:Static resx:ResUI.TbSettingsEditMixin}"
|
Content="{x:Static resx:ResUI.TbSettingsEditMixin}"
|
||||||
Style="{StaticResource DefButton}" />
|
Style="{StaticResource DefButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</ScrollViewer>
|
||||||
|
</TabItem>
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsClashN}">
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsClashN}">
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<Grid Grid.Row="2" Margin="8">
|
<Grid Grid.Row="2" Margin="8">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -350,10 +351,11 @@
|
|||||||
Style="{StaticResource DefButton}" />
|
Style="{StaticResource DefButton}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
</TabItem>
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
|
|
||||||
<Grid Grid.Row="3" Margin="8">
|
<Grid Grid.Row="3" Margin="8">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -416,9 +418,9 @@
|
|||||||
Width="200"
|
Width="200"
|
||||||
Margin="8" />
|
Margin="8" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
|
||||||
</ScrollViewer>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</reactiveui:ReactiveUserControl>
|
</reactiveui:ReactiveUserControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user