mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 09:14:25 +08:00
0.7.0.0
This commit is contained in:
@@ -546,14 +546,24 @@ public partial class CnrDailyNewsWidget : UserControl, IDesktopComponentWidget,
|
||||
var totalWidth = Bounds.Width > 1 ? Bounds.Width : _currentCellSize * BaseWidthCells;
|
||||
|
||||
RootBorder.CornerRadius = ComponentChromeCornerRadiusHelper.Scale(34 * scale, 16, 52);
|
||||
RootBorder.Padding = new Thickness(0);
|
||||
RootBorder.Padding = ComponentChromeCornerRadiusHelper.SafeThickness(
|
||||
10 * scale,
|
||||
8 * scale,
|
||||
null,
|
||||
0.45d);
|
||||
|
||||
CardBorder.CornerRadius = ComponentChromeCornerRadiusHelper.Scale(34 * scale, 16, 52);
|
||||
CardBorder.Padding = new Thickness(
|
||||
CardBorder.Padding = ComponentChromeCornerRadiusHelper.SafeThickness(
|
||||
Math.Clamp(16 * scale, 8, 24),
|
||||
Math.Clamp(14 * scale, 7, 22),
|
||||
Math.Clamp(16 * scale, 8, 24),
|
||||
Math.Clamp(14 * scale, 7, 22));
|
||||
null,
|
||||
0.55d);
|
||||
|
||||
var rootPadding = RootBorder.Padding;
|
||||
var cardPadding = CardBorder.Padding;
|
||||
var contentWidth = Math.Max(
|
||||
150,
|
||||
totalWidth - rootPadding.Left - rootPadding.Right - cardPadding.Left - cardPadding.Right);
|
||||
|
||||
var headlineFont = Math.Clamp(24 * scale, 12, 34);
|
||||
BrandPrimaryTextBlock.FontSize = headlineFont;
|
||||
@@ -567,7 +577,7 @@ public partial class CnrDailyNewsWidget : UserControl, IDesktopComponentWidget,
|
||||
RefreshGlyphIcon.FontSize = Math.Clamp(19 * scale, 11, 24);
|
||||
RefreshLabelTextBlock.FontSize = Math.Clamp(22 * scale, 11, 29);
|
||||
|
||||
var imageWidth = Math.Clamp(totalWidth * 0.20, 60, 170);
|
||||
var imageWidth = Math.Clamp(contentWidth * 0.20, 60, 170);
|
||||
var imageHeight = Math.Clamp(imageWidth * 0.56, 38, 94);
|
||||
News1ImageHost.Width = imageWidth;
|
||||
News1ImageHost.Height = imageHeight;
|
||||
@@ -584,7 +594,7 @@ public partial class CnrDailyNewsWidget : UserControl, IDesktopComponentWidget,
|
||||
|
||||
var availableTextWidth = Math.Max(
|
||||
84,
|
||||
totalWidth - imageWidth - columnGap - Math.Clamp(20 * scale, 10, 32));
|
||||
contentWidth - imageWidth - columnGap - Math.Clamp(20 * scale, 10, 32));
|
||||
News1TitleTextBlock.MaxWidth = availableTextWidth;
|
||||
News2TitleTextBlock.MaxWidth = availableTextWidth;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user