optimized UI

This commit is contained in:
2dust
2022-11-20 19:47:39 +08:00
parent a910accbd6
commit aaad409537
4 changed files with 24 additions and 18 deletions

View File

@@ -161,7 +161,7 @@ namespace clashN.ViewModels
}
}
private void EditProfile(bool blNew)
public void EditProfile(bool blNew)
{
ProfileItem item;
if (blNew)

View File

@@ -25,16 +25,13 @@
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Grid>
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid
x:Name="gridText"
Grid.Row="0"
Margin="8">
<Grid x:Name="gridText" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />

View File

@@ -21,6 +21,7 @@ namespace clashN.Views
ViewModel = new ProfilesViewModel();
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(ProfilesViewModel));
lstProfiles.PreviewMouseDoubleClick += lstProfiles_PreviewMouseDoubleClick;
lstProfiles.PreviewMouseLeftButtonDown += LstProfiles_PreviewMouseLeftButtonDown;
lstProfiles.MouseMove += LstProfiles_MouseMove;
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
private Point startPoint = new Point();
@@ -186,5 +192,6 @@ namespace clashN.Views
}
#endregion
}
}

View File

@@ -58,9 +58,9 @@
DockPanel.Dock="Top"
Style="{StaticResource ListItemTitle}"
Text="{x:Static resx:ResUI.TbSettingsSaveTip}" />
<ScrollViewer VerticalScrollBarVisibility="Auto">
<TabControl>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
<TabControl>
<TabItem Header="{x:Static resx:ResUI.TbSettingsCore}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Grid.Row="1" Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -205,9 +205,10 @@
Content="{x:Static resx:ResUI.TbSettingsEditMixin}"
Style="{StaticResource DefButton}" />
</Grid>
</TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsClashN}">
</ScrollViewer>
</TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsClashN}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Grid.Row="2" Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -350,10 +351,11 @@
Style="{StaticResource DefButton}" />
</Grid>
</ScrollViewer>
</TabItem>
</TabItem>
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Grid.Row="3" Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -416,9 +418,9 @@
Width="200"
Margin="8" />
</Grid>
</ScrollViewer>
</TabItem>
</TabControl>
</TabItem>
</TabControl>
</ScrollViewer>
</DockPanel>
</reactiveui:ReactiveUserControl>