mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-23 01:44:26 +08:00
0.1.7
This commit is contained in:
@@ -74,8 +74,13 @@
|
|||||||
"filepicker.video_files": "Video files",
|
"filepicker.video_files": "Video files",
|
||||||
"common.day": "Day",
|
"common.day": "Day",
|
||||||
"common.night": "Night",
|
"common.night": "Night",
|
||||||
|
"common.close": "Close",
|
||||||
"common.recommended": "Recommended",
|
"common.recommended": "Recommended",
|
||||||
"common.monet": "Monet",
|
"common.monet": "Monet",
|
||||||
|
"button.component_library": "Component Library",
|
||||||
|
"tooltip.component_library": "Component Library",
|
||||||
|
"component_library.title": "Component Library",
|
||||||
|
"component_library.empty": "No components yet. Components will appear here later.",
|
||||||
"placement.fill": "Fill",
|
"placement.fill": "Fill",
|
||||||
"placement.fit": "Fit",
|
"placement.fit": "Fit",
|
||||||
"placement.stretch": "Stretch",
|
"placement.stretch": "Stretch",
|
||||||
|
|||||||
@@ -58,6 +58,14 @@ public partial class MainWindow
|
|||||||
BackToWindowsTextBlock.Text = L("button.back_to_windows", "Back to Windows");
|
BackToWindowsTextBlock.Text = L("button.back_to_windows", "Back to Windows");
|
||||||
WallpaperPreviewBackButtonTextBlock.Text = L("button.back_to_windows", "Back to Windows");
|
WallpaperPreviewBackButtonTextBlock.Text = L("button.back_to_windows", "Back to Windows");
|
||||||
ToolTip.SetTip(BackToWindowsButton, L("tooltip.back_to_windows", "Back to Windows"));
|
ToolTip.SetTip(BackToWindowsButton, L("tooltip.back_to_windows", "Back to Windows"));
|
||||||
|
OpenComponentLibraryTextBlock.Text = L("button.component_library", "组件库");
|
||||||
|
WallpaperPreviewComponentLibraryTextBlock.Text = L("button.component_library", "组件库");
|
||||||
|
ToolTip.SetTip(OpenComponentLibraryButton, L("tooltip.component_library", "组件库"));
|
||||||
|
ComponentLibraryTitleTextBlock.Text = L("component_library.title", "组件库");
|
||||||
|
ToolTip.SetTip(CloseComponentLibraryButton, L("common.close", "关闭"));
|
||||||
|
ComponentLibraryEmptyTextBlock.Text = L(
|
||||||
|
"component_library.empty",
|
||||||
|
"暂无组件,后续将在这里显示。");
|
||||||
|
|
||||||
SettingsTitleTextBlock.Text = L("settings.title", "Settings");
|
SettingsTitleTextBlock.Text = L("settings.title", "Settings");
|
||||||
SettingsNavHeaderTextBlock.Text = L("settings.nav_header", "Settings");
|
SettingsNavHeaderTextBlock.Text = L("settings.nav_header", "Settings");
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ public partial class MainWindow
|
|||||||
{
|
{
|
||||||
private void OnOpenSettingsClick(object? sender, RoutedEventArgs e)
|
private void OnOpenSettingsClick(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (_isComponentLibraryOpen)
|
||||||
|
{
|
||||||
|
CloseComponentLibraryWindow(reopenSettings: false);
|
||||||
|
}
|
||||||
|
|
||||||
if (_isSettingsOpen)
|
if (_isSettingsOpen)
|
||||||
{
|
{
|
||||||
CloseSettingsPage();
|
CloseSettingsPage();
|
||||||
@@ -33,6 +38,27 @@ public partial class MainWindow
|
|||||||
OpenSettingsPage();
|
OpenSettingsPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnOpenComponentLibraryClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_isComponentLibraryOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_reopenSettingsAfterComponentLibraryClose = _isSettingsOpen;
|
||||||
|
if (_isSettingsOpen)
|
||||||
|
{
|
||||||
|
CloseSettingsPage(immediate: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
OpenComponentLibraryWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnCloseComponentLibraryClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
CloseComponentLibraryWindow(reopenSettings: true);
|
||||||
|
}
|
||||||
|
|
||||||
private void OnCloseSettingsClick(object? sender, RoutedEventArgs e)
|
private void OnCloseSettingsClick(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
CloseSettingsPage();
|
CloseSettingsPage();
|
||||||
@@ -701,8 +727,10 @@ public partial class MainWindow
|
|||||||
private void ApplyTaskbarActionVisibility(TaskbarContext context)
|
private void ApplyTaskbarActionVisibility(TaskbarContext context)
|
||||||
{
|
{
|
||||||
if (BackToWindowsButton is null ||
|
if (BackToWindowsButton is null ||
|
||||||
|
OpenComponentLibraryButton is null ||
|
||||||
OpenSettingsButton is null ||
|
OpenSettingsButton is null ||
|
||||||
WallpaperPreviewBackButtonVisual is null ||
|
WallpaperPreviewBackButtonVisual is null ||
|
||||||
|
WallpaperPreviewComponentLibraryVisual is null ||
|
||||||
WallpaperPreviewSettingsButtonIcon is null)
|
WallpaperPreviewSettingsButtonIcon is null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -710,10 +738,13 @@ public partial class MainWindow
|
|||||||
|
|
||||||
var showMinimize = _pinnedTaskbarActions.Contains(TaskbarActionId.MinimizeToWindows);
|
var showMinimize = _pinnedTaskbarActions.Contains(TaskbarActionId.MinimizeToWindows);
|
||||||
var showSettings = _pinnedTaskbarActions.Contains(TaskbarActionId.OpenSettings);
|
var showSettings = _pinnedTaskbarActions.Contains(TaskbarActionId.OpenSettings);
|
||||||
|
var showComponentLibrary = _isSettingsOpen || _isComponentLibraryOpen;
|
||||||
|
|
||||||
BackToWindowsButton.IsVisible = showMinimize;
|
BackToWindowsButton.IsVisible = showMinimize;
|
||||||
|
OpenComponentLibraryButton.IsVisible = showComponentLibrary;
|
||||||
OpenSettingsButton.IsVisible = showSettings;
|
OpenSettingsButton.IsVisible = showSettings;
|
||||||
WallpaperPreviewBackButtonVisual.IsVisible = showMinimize;
|
WallpaperPreviewBackButtonVisual.IsVisible = showMinimize;
|
||||||
|
WallpaperPreviewComponentLibraryVisual.IsVisible = showComponentLibrary;
|
||||||
WallpaperPreviewSettingsButtonIcon.IsVisible = showSettings;
|
WallpaperPreviewSettingsButtonIcon.IsVisible = showSettings;
|
||||||
|
|
||||||
if (TaskbarFixedActionsHost is not null)
|
if (TaskbarFixedActionsHost is not null)
|
||||||
@@ -723,7 +754,7 @@ public partial class MainWindow
|
|||||||
|
|
||||||
if (TaskbarSettingsActionHost is not null)
|
if (TaskbarSettingsActionHost is not null)
|
||||||
{
|
{
|
||||||
TaskbarSettingsActionHost.IsVisible = showSettings;
|
TaskbarSettingsActionHost.IsVisible = showSettings || showComponentLibrary;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WallpaperPreviewTaskbarFixedActionsHost is not null)
|
if (WallpaperPreviewTaskbarFixedActionsHost is not null)
|
||||||
@@ -733,7 +764,7 @@ public partial class MainWindow
|
|||||||
|
|
||||||
if (WallpaperPreviewTaskbarSettingsActionHost is not null)
|
if (WallpaperPreviewTaskbarSettingsActionHost is not null)
|
||||||
{
|
{
|
||||||
WallpaperPreviewTaskbarSettingsActionHost.IsVisible = showSettings;
|
WallpaperPreviewTaskbarSettingsActionHost.IsVisible = showSettings || showComponentLibrary;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dynamicActions = ResolveDynamicTaskbarActions(context);
|
var dynamicActions = ResolveDynamicTaskbarActions(context);
|
||||||
@@ -775,6 +806,58 @@ public partial class MainWindow
|
|||||||
ApplyWidgetSizing(effectiveCellSize);
|
ApplyWidgetSizing(effectiveCellSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OpenComponentLibraryWindow()
|
||||||
|
{
|
||||||
|
if (ComponentLibraryWindow is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isComponentLibraryOpen = true;
|
||||||
|
ComponentLibraryWindow.IsVisible = true;
|
||||||
|
ComponentLibraryWindow.Opacity = 0;
|
||||||
|
ApplyTaskbarActionVisibility(GetCurrentTaskbarContext());
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Post(() =>
|
||||||
|
{
|
||||||
|
if (!_isComponentLibraryOpen || ComponentLibraryWindow is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ComponentLibraryWindow.Opacity = 1;
|
||||||
|
}, DispatcherPriority.Background);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseComponentLibraryWindow(bool reopenSettings)
|
||||||
|
{
|
||||||
|
if (!_isComponentLibraryOpen || ComponentLibraryWindow is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isComponentLibraryOpen = false;
|
||||||
|
ComponentLibraryWindow.Opacity = 0;
|
||||||
|
ApplyTaskbarActionVisibility(GetCurrentTaskbarContext());
|
||||||
|
|
||||||
|
DispatcherTimer.RunOnce(() =>
|
||||||
|
{
|
||||||
|
if (_isComponentLibraryOpen || ComponentLibraryWindow is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ComponentLibraryWindow.IsVisible = false;
|
||||||
|
|
||||||
|
var shouldReopenSettings = reopenSettings && _reopenSettingsAfterComponentLibraryClose;
|
||||||
|
_reopenSettingsAfterComponentLibraryClose = false;
|
||||||
|
if (shouldReopenSettings)
|
||||||
|
{
|
||||||
|
OpenSettingsPage();
|
||||||
|
}
|
||||||
|
}, TimeSpan.FromMilliseconds(200));
|
||||||
|
}
|
||||||
|
|
||||||
private IReadOnlyList<TaskbarActionItem> ResolveDynamicTaskbarActions(TaskbarContext context)
|
private IReadOnlyList<TaskbarActionItem> ResolveDynamicTaskbarActions(TaskbarContext context)
|
||||||
{
|
{
|
||||||
if (!_enableDynamicTaskbarActions)
|
if (!_enableDynamicTaskbarActions)
|
||||||
@@ -1182,6 +1265,11 @@ public partial class MainWindow
|
|||||||
|
|
||||||
private void OpenSettingsPage()
|
private void OpenSettingsPage()
|
||||||
{
|
{
|
||||||
|
if (_isComponentLibraryOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_isSettingsOpen)
|
if (_isSettingsOpen)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -1207,7 +1295,7 @@ public partial class MainWindow
|
|||||||
}, DispatcherPriority.Background);
|
}, DispatcherPriority.Background);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CloseSettingsPage()
|
private void CloseSettingsPage(bool immediate = false)
|
||||||
{
|
{
|
||||||
if (!_isSettingsOpen)
|
if (!_isSettingsOpen)
|
||||||
{
|
{
|
||||||
@@ -1219,6 +1307,13 @@ public partial class MainWindow
|
|||||||
ApplyWallpaperBrush();
|
ApplyWallpaperBrush();
|
||||||
ApplyTaskbarActionVisibility(GetCurrentTaskbarContext());
|
ApplyTaskbarActionVisibility(GetCurrentTaskbarContext());
|
||||||
|
|
||||||
|
if (immediate)
|
||||||
|
{
|
||||||
|
SettingsPage.Opacity = 0;
|
||||||
|
SettingsPage.IsVisible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SettingsPage.Opacity = 0;
|
SettingsPage.Opacity = 0;
|
||||||
|
|
||||||
DispatcherTimer.RunOnce(() =>
|
DispatcherTimer.RunOnce(() =>
|
||||||
|
|||||||
@@ -162,7 +162,34 @@
|
|||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0">
|
BorderThickness="0">
|
||||||
|
<Grid ColumnDefinitions="Auto,Auto"
|
||||||
|
ColumnSpacing="8">
|
||||||
|
<Button x:Name="OpenComponentLibraryButton"
|
||||||
|
Grid.Column="0"
|
||||||
|
IsVisible="False"
|
||||||
|
Padding="8"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||||
|
Click="OnOpenComponentLibraryClick"
|
||||||
|
ToolTip.Tip="组件库">
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="8">
|
||||||
|
<fi:FluentIcon Classes="icon-m"
|
||||||
|
Icon="Apps"
|
||||||
|
IconVariant="Regular" />
|
||||||
|
<TextBlock x:Name="OpenComponentLibraryTextBlock"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||||
|
Text="组件库" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<Button x:Name="OpenSettingsButton"
|
<Button x:Name="OpenSettingsButton"
|
||||||
|
Grid.Column="1"
|
||||||
Padding="6"
|
Padding="6"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
@@ -184,6 +211,7 @@
|
|||||||
Text="返回桌面" />
|
Text="返回桌面" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -398,10 +426,30 @@
|
|||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0">
|
BorderThickness="0">
|
||||||
|
<Grid ColumnDefinitions="Auto,Auto"
|
||||||
|
ColumnSpacing="3">
|
||||||
|
<StackPanel x:Name="WallpaperPreviewComponentLibraryVisual"
|
||||||
|
Grid.Column="0"
|
||||||
|
IsVisible="False"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="3">
|
||||||
|
<fi:FluentIcon Classes="icon-s"
|
||||||
|
Icon="Apps"
|
||||||
|
IconVariant="Regular" />
|
||||||
|
<TextBlock x:Name="WallpaperPreviewComponentLibraryTextBlock"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||||
|
Text="组件库" />
|
||||||
|
</StackPanel>
|
||||||
<fi:SymbolIcon x:Name="WallpaperPreviewSettingsButtonIcon"
|
<fi:SymbolIcon x:Name="WallpaperPreviewSettingsButtonIcon"
|
||||||
|
Grid.Column="1"
|
||||||
Classes="icon-s"
|
Classes="icon-s"
|
||||||
Symbol="Settings"
|
Symbol="Settings"
|
||||||
IconVariant="Regular" />
|
IconVariant="Regular" />
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -776,6 +824,63 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<Border x:Name="ComponentLibraryWindow"
|
||||||
|
IsVisible="False"
|
||||||
|
Opacity="0"
|
||||||
|
Classes="glass-strong"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Width="520"
|
||||||
|
MinWidth="360"
|
||||||
|
MaxWidth="720"
|
||||||
|
Height="260"
|
||||||
|
MinHeight="220"
|
||||||
|
Margin="24,24,24,100"
|
||||||
|
CornerRadius="18"
|
||||||
|
Padding="14">
|
||||||
|
<Border.Transitions>
|
||||||
|
<Transitions>
|
||||||
|
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
|
||||||
|
</Transitions>
|
||||||
|
</Border.Transitions>
|
||||||
|
|
||||||
|
<Grid RowDefinitions="Auto,*"
|
||||||
|
RowSpacing="10">
|
||||||
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
|
<TextBlock x:Name="ComponentLibraryTitleTextBlock"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="16"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||||
|
Text="组件库" />
|
||||||
|
<Button x:Name="CloseComponentLibraryButton"
|
||||||
|
Grid.Column="1"
|
||||||
|
Padding="8"
|
||||||
|
Width="32"
|
||||||
|
Height="32"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||||
|
Click="OnCloseComponentLibraryClick">
|
||||||
|
<fi:SymbolIcon Classes="icon-s"
|
||||||
|
Symbol="Dismiss"
|
||||||
|
IconVariant="Regular" />
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Border Grid.Row="1"
|
||||||
|
Classes="glass-panel"
|
||||||
|
CornerRadius="12"
|
||||||
|
Padding="14">
|
||||||
|
<TextBlock x:Name="ComponentLibraryEmptyTextBlock"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||||
|
Text="暂无组件,后续将在这里显示。" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ public partial class MainWindow : Window
|
|||||||
private bool _suppressLanguageSelectionEvents;
|
private bool _suppressLanguageSelectionEvents;
|
||||||
private bool _suppressSettingsPersistence;
|
private bool _suppressSettingsPersistence;
|
||||||
private bool _isUpdatingWallpaperPreviewLayout;
|
private bool _isUpdatingWallpaperPreviewLayout;
|
||||||
|
private bool _isComponentLibraryOpen;
|
||||||
|
private bool _reopenSettingsAfterComponentLibraryClose;
|
||||||
private TranslateTransform? _settingsContentPanelTransform;
|
private TranslateTransform? _settingsContentPanelTransform;
|
||||||
private IBrush? _defaultDesktopBackground;
|
private IBrush? _defaultDesktopBackground;
|
||||||
private Bitmap? _wallpaperBitmap;
|
private Bitmap? _wallpaperBitmap;
|
||||||
@@ -327,6 +329,11 @@ public partial class MainWindow : Window
|
|||||||
BackToWindowsButton.FontSize = Math.Clamp(cellSize * 0.22, 8, 22);
|
BackToWindowsButton.FontSize = Math.Clamp(cellSize * 0.22, 8, 22);
|
||||||
BackToWindowsButton.MinHeight = taskbarCell;
|
BackToWindowsButton.MinHeight = taskbarCell;
|
||||||
BackToWindowsButton.MinWidth = Math.Clamp(cellSize * 2.3, 90, 320);
|
BackToWindowsButton.MinWidth = Math.Clamp(cellSize * 2.3, 90, 320);
|
||||||
|
OpenComponentLibraryButton.Margin = new Thickness(0);
|
||||||
|
OpenComponentLibraryButton.Padding = new Thickness(horizontalPadding, verticalPadding);
|
||||||
|
OpenComponentLibraryButton.FontSize = Math.Clamp(cellSize * 0.22, 8, 22);
|
||||||
|
OpenComponentLibraryButton.MinHeight = taskbarCell;
|
||||||
|
OpenComponentLibraryButton.MinWidth = Math.Clamp(cellSize * 2.0, 88, 300);
|
||||||
|
|
||||||
OpenSettingsButton.Margin = new Thickness(0);
|
OpenSettingsButton.Margin = new Thickness(0);
|
||||||
OpenSettingsButton.Height = taskbarCell;
|
OpenSettingsButton.Height = taskbarCell;
|
||||||
@@ -344,6 +351,23 @@ public partial class MainWindow : Window
|
|||||||
OpenSettingsButton.MinWidth = taskbarCell;
|
OpenSettingsButton.MinWidth = taskbarCell;
|
||||||
OpenSettingsButton.Padding = new Thickness(Math.Clamp(taskbarCell * 0.2, 4, 12));
|
OpenSettingsButton.Padding = new Thickness(Math.Clamp(taskbarCell * 0.2, 4, 12));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateComponentLibraryLayout(cellSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateComponentLibraryLayout(double cellSize)
|
||||||
|
{
|
||||||
|
if (ComponentLibraryWindow is null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var horizontalMargin = Math.Clamp(cellSize * 0.7, 18, 44);
|
||||||
|
var bottomMargin = Math.Clamp(cellSize * 1.4, 56, 190);
|
||||||
|
ComponentLibraryWindow.Margin = new Thickness(horizontalMargin, 20, horizontalMargin, bottomMargin);
|
||||||
|
ComponentLibraryWindow.CornerRadius = new CornerRadius(Math.Clamp(cellSize * 0.24, 12, 24));
|
||||||
|
ComponentLibraryWindow.Height = Math.Clamp(cellSize * 4.8, 220, 360);
|
||||||
|
ComponentLibraryWindow.Width = Math.Clamp(cellSize * 9.2, 360, 760);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSettingsViewportInsets(double cellSize)
|
private void UpdateSettingsViewportInsets(double cellSize)
|
||||||
@@ -473,8 +497,11 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
WallpaperPreviewClockTextBlock.FontSize = Math.Clamp(cellSize * 0.30, 6, 18);
|
WallpaperPreviewClockTextBlock.FontSize = Math.Clamp(cellSize * 0.30, 6, 18);
|
||||||
WallpaperPreviewBackButtonTextBlock.FontSize = Math.Clamp(cellSize * 0.19, 5, 13);
|
WallpaperPreviewBackButtonTextBlock.FontSize = Math.Clamp(cellSize * 0.19, 5, 13);
|
||||||
|
WallpaperPreviewComponentLibraryTextBlock.FontSize = Math.Clamp(cellSize * 0.18, 5, 12);
|
||||||
WallpaperPreviewBackButtonVisual.MinHeight = previewTaskbarCell;
|
WallpaperPreviewBackButtonVisual.MinHeight = previewTaskbarCell;
|
||||||
WallpaperPreviewBackButtonVisual.MinWidth = Math.Clamp(cellSize * 2.1, 30, 120);
|
WallpaperPreviewBackButtonVisual.MinWidth = Math.Clamp(cellSize * 2.1, 30, 120);
|
||||||
|
WallpaperPreviewComponentLibraryVisual.MinHeight = previewTaskbarCell;
|
||||||
|
WallpaperPreviewComponentLibraryVisual.MinWidth = Math.Clamp(cellSize * 2.0, 28, 110);
|
||||||
WallpaperPreviewSettingsButtonIcon.Width = Math.Clamp(previewTaskbarCell * 0.42, 6, 14);
|
WallpaperPreviewSettingsButtonIcon.Width = Math.Clamp(previewTaskbarCell * 0.42, 6, 14);
|
||||||
WallpaperPreviewSettingsButtonIcon.Height = Math.Clamp(previewTaskbarCell * 0.42, 6, 14);
|
WallpaperPreviewSettingsButtonIcon.Height = Math.Clamp(previewTaskbarCell * 0.42, 6, 14);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user