A:调整展示效果
This commit is contained in:
1 parent
c8207a2c85
commit
8e67d345aa
2 files changed
+12
-12
No files matched your search
@@ -134,8 +134,9 @@
|
|||||||
FontWeight="Normal"
|
FontWeight="Normal"
|
||||||
Foreground="#666666"
|
Foreground="#666666"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
MaxWidth="60"
|
Width="70"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
|
TextAlignment="Left"
|
||||||
Margin="4,0,8,0" />
|
Margin="4,0,8,0" />
|
||||||
|
|
||||||
<!-- Upload Speed -->
|
<!-- Upload Speed -->
|
||||||
|
|||||||
@@ -36,16 +36,13 @@ public partial class SettingsWindow : Window
|
|||||||
this.Loaded += SettingsWindow_Loaded;
|
this.Loaded += SettingsWindow_Loaded;
|
||||||
this.Closing += SettingsWindow_Closing;
|
this.Closing += SettingsWindow_Closing;
|
||||||
|
|
||||||
LoadCurrentSettings();
|
|
||||||
UpdatePreview();
|
|
||||||
|
|
||||||
Log.Info("SettingsWindow 初始化");
|
Log.Info("SettingsWindow 初始化");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowWindow()
|
public static async void ShowWindow()
|
||||||
{
|
{
|
||||||
var window = Instance;
|
var window = Instance;
|
||||||
window.LoadCurrentSettingsAsync();
|
await window.LoadCurrentSettingsAsync();
|
||||||
window.UpdatePreview();
|
window.UpdatePreview();
|
||||||
window.Show();
|
window.Show();
|
||||||
window.Activate();
|
window.Activate();
|
||||||
@@ -64,7 +61,7 @@ public partial class SettingsWindow : Window
|
|||||||
Log.Info("SettingsWindow 隐藏");
|
Log.Info("SettingsWindow 隐藏");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadCurrentSettingsAsync()
|
private async Task LoadCurrentSettingsAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -119,6 +116,9 @@ public partial class SettingsWindow : Window
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log.Info(
|
||||||
|
$"加载网速排行榜设置: ShowNetworkTopList={_settings.ShowNetworkTopList}, NetworkTopListCount={_settings.NetworkTopListCount}, IsHorizontal={_settings.LayoutDirection == 0}");
|
||||||
|
|
||||||
UpdateTopListAvailability();
|
UpdateTopListAvailability();
|
||||||
|
|
||||||
// 设置双击动作
|
// 设置双击动作
|
||||||
@@ -283,11 +283,6 @@ public partial class SettingsWindow : Window
|
|||||||
var isHorizontal = HorizontalLayoutRadio.IsChecked == true;
|
var isHorizontal = HorizontalLayoutRadio.IsChecked == true;
|
||||||
ShowTopListCheckBox.IsEnabled = isHorizontal;
|
ShowTopListCheckBox.IsEnabled = isHorizontal;
|
||||||
|
|
||||||
if (!isHorizontal)
|
|
||||||
{
|
|
||||||
ShowTopListCheckBox.IsChecked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateTopListCountVisibility();
|
UpdateTopListCountVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -420,10 +415,14 @@ public partial class SettingsWindow : Window
|
|||||||
// 转换布局方向
|
// 转换布局方向
|
||||||
_settings.LayoutDirection = HorizontalLayoutRadio.IsChecked == true ? 0 : 1; // 0为横向,1为纵向
|
_settings.LayoutDirection = HorizontalLayoutRadio.IsChecked == true ? 0 : 1; // 0为横向,1为纵向
|
||||||
|
|
||||||
|
// 保存网速Top榜设置 - 只在横向布局时保存为true,纵向布局时保存实际的UI状态但应用时会被忽略
|
||||||
_settings.ShowNetworkTopList = ShowTopListCheckBox.IsChecked == true;
|
_settings.ShowNetworkTopList = ShowTopListCheckBox.IsChecked == true;
|
||||||
var selectedCount = ((ComboBoxItem)TopListCountComboBox.SelectedItem)?.Tag?.ToString() ?? "3";
|
var selectedCount = ((ComboBoxItem)TopListCountComboBox.SelectedItem)?.Tag?.ToString() ?? "3";
|
||||||
_settings.NetworkTopListCount = int.Parse(selectedCount);
|
_settings.NetworkTopListCount = int.Parse(selectedCount);
|
||||||
|
|
||||||
|
Log.Info(
|
||||||
|
$"保存网速排行榜设置: ShowNetworkTopList={_settings.ShowNetworkTopList}, NetworkTopListCount={_settings.NetworkTopListCount}, IsHorizontal={HorizontalLayoutRadio.IsChecked}");
|
||||||
|
|
||||||
// 转换双击动作
|
// 转换双击动作
|
||||||
var selectedAction = ((ComboBoxItem)DoubleClickActionComboBox.SelectedItem)?.Tag?.ToString() ?? "None";
|
var selectedAction = ((ComboBoxItem)DoubleClickActionComboBox.SelectedItem)?.Tag?.ToString() ?? "None";
|
||||||
_settings.DoubleClickAction = selectedAction switch
|
_settings.DoubleClickAction = selectedAction switch
|
||||||
|
|||||||
Reference in new issue
Block a user