Improved UI for Desktop version

pull/5829/head
2dust 2024-10-04 14:25:09 +08:00
parent 2bb5f6afc4
commit 90ba80436d
8 changed files with 47 additions and 13 deletions

View File

@ -1473,6 +1473,15 @@ namespace ServiceLib.Resx {
}
}
/// <summary>
/// 查找类似 Save Interface Layout 的本地化字符串。
/// </summary>
public static string menuStorageUI {
get {
return ResourceManager.GetString("menuStorageUI", resourceCulture);
}
}
/// <summary>
/// 查找类似 Add 的本地化字符串。
/// </summary>

View File

@ -1324,4 +1324,7 @@
<data name="TipActiveServer" xml:space="preserve">
<value>Active</value>
</data>
<data name="menuStorageUI" xml:space="preserve">
<value>Save Interface Layout</value>
</data>
</root>

View File

@ -1321,4 +1321,7 @@
<data name="TipActiveServer" xml:space="preserve">
<value>活动</value>
</data>
<data name="menuStorageUI" xml:space="preserve">
<value>保存界面布局</value>
</data>
</root>

View File

@ -1201,4 +1201,7 @@
<data name="TipActiveServer" xml:space="preserve">
<value>活動</value>
</data>
<data name="menuStorageUI" xml:space="preserve">
<value>儲存介面佈局</value>
</data>
</root>

View File

@ -10,7 +10,10 @@
d:DesignWidth="800"
x:DataType="vms:CheckUpdateViewModel"
mc:Ignorable="d">
<Button Classes="Tertiary">
<Button
Classes="Tertiary"
FontWeight="Regular"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<TextBlock Text="{x:Static resx:ResUI.menuCheckUpdate}" />
</Button.Content>

View File

@ -54,21 +54,26 @@
Source="/Assets/add.png" />
</Button.Content>
</Button>
<Button
<SplitButton
x:Name="btnAutofitColumnWidth"
Width="30"
Width="54"
Height="30"
Margin="20,0"
Classes="Success"
Theme="{DynamicResource SolidButton}"
Theme="{DynamicResource SolidSplitButton}"
ToolTip.Tip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
<Button.Content>
<SplitButton.Content>
<Image
Width="20"
Height="20"
Source="/Assets/fit.png" />
</Button.Content>
</Button>
</SplitButton.Content>
<SplitButton.Flyout>
<MenuFlyout>
<MenuItem Name="menuStorageUI" Header="{x:Static resx:ResUI.menuStorageUI}" />
</MenuFlyout>
</SplitButton.Flyout>
</SplitButton>
<TextBox
x:Name="txtServerFilter"

View File

@ -27,6 +27,7 @@ namespace v2rayN.Desktop.Views
menuSelectAll.Click += menuSelectAll_Click;
btnAutofitColumnWidth.Click += BtnAutofitColumnWidth_Click;
txtServerFilter.KeyDown += TxtServerFilter_KeyDown;
menuStorageUI.Click += MenuStorageUI_Click;
lstProfiles.KeyDown += LstProfiles_KeyDown;
lstProfiles.SelectionChanged += lstProfiles_SelectionChanged;
lstProfiles.DoubleTapped += LstProfiles_DoubleTapped;
@ -195,8 +196,7 @@ namespace v2rayN.Desktop.Views
else
{
ViewModel?.EditServerAsync(EConfigType.Custom);
}
StorageUI();
}
}
private void LstProfiles_LoadingRow(object? sender, DataGridRowEventArgs e)
@ -304,7 +304,6 @@ namespace v2rayN.Desktop.Views
{
it.Width = new DataGridLength(1, DataGridLengthUnitType.Auto);
}
StorageUI();
}
private void TxtServerFilter_KeyDown(object? sender, KeyEventArgs e)
@ -314,6 +313,10 @@ namespace v2rayN.Desktop.Views
ViewModel?.RefreshServers();
}
}
private void MenuStorageUI_Click(object? sender, RoutedEventArgs e)
{
StorageUI();
}
//#endregion Event

View File

@ -10,12 +10,17 @@
d:DesignWidth="800"
x:DataType="vms:ThemeSettingViewModel"
mc:Ignorable="d">
<Button Width="30" Height="30">
<Button
Width="30"
Height="30"
Margin="10,0"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<Image
<PathIcon
Width="20"
Height="20"
Source="/Assets/more.png" />
Data="M511.9,276.3c43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2 -43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2zM511.9,434.8c-43.8,0 -79.2,35.5 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2zM511.9,751.8c-43.8,0 -79.2,35.4 -79.2,79.2 0,43.8 35.5,79.2 79.2,79.2 43.8,0 79.2,-35.5 79.2,-79.2 0,-43.8 -35.5,-79.2 -79.2,-79.2z"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button.Content>
<Button.Flyout>
<Flyout>