Jelajahi Sumber

total redesign again

it feels too busy, too visually noisy, not discoverable, and not optimized for different screen sizes. i think most users will find this very hard to use. i need complete and total redesign from scratch. you can see in the screenshots how it looks now.
Daniel Chalmers 1 bulan lalu
induk
melakukan
0a3cb28190
2 mengubah file dengan 20 tambahan dan 50 penghapusan
  1. 20 22
      DesktopClock/SettingsWindow.xaml
  2. 0 28
      DesktopClock/SettingsWindow.xaml.cs

+ 20 - 22
DesktopClock/SettingsWindow.xaml

@@ -189,17 +189,15 @@
             <Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
             <Setter Property="TextWrapping" Value="Wrap" />
         </Style>
-    </Window.Resources>
 
-    <Grid Margin="18">
-        <ScrollViewer x:Name="SettingsScrollViewer"
-                      VerticalScrollBarVisibility="Auto"
-                      HorizontalScrollBarVisibility="Disabled"
-                      ScrollChanged="SettingsScrollViewer_ScrollChanged"
-                      Loaded="SettingsScrollViewer_Loaded">
-            <StackPanel x:Name="SettingsContent"
-                        Margin="0,0,6,24">
-                <Border x:Name="DisplaySection"
+        
+
+        
+    </Window.Resources>
+    <Grid Margin="24">
+        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
+            <StackPanel x:Name="SettingsContent" Margin="0,0,12,0">
+<Border x:Name="DisplaySection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -297,8 +295,8 @@
                         </Border>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="TimeZoneSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="TimeZoneSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -319,8 +317,8 @@
                         </Border>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="CountdownSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="CountdownSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -516,8 +514,8 @@
                         </Grid>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="SoundAlertsSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="SoundAlertsSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -574,8 +572,8 @@
                         </Border>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="AppearanceSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="AppearanceSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -863,8 +861,8 @@
                         </Border>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="WindowSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="WindowSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"
@@ -945,8 +943,8 @@
                         </Grid>
                     </StackPanel>
                 </Border>
-
-                <Border x:Name="ToolsSection"
+                <Border Margin="0,32,0,32" Height="1" Background="{StaticResource BorderBrush}" />
+<Border x:Name="ToolsSection"
                         Style="{StaticResource SectionCardStyle}">
                     <StackPanel>
                         <TextBlock Style="{StaticResource SectionTitleStyle}"

+ 0 - 28
DesktopClock/SettingsWindow.xaml.cs

@@ -20,8 +20,6 @@ namespace DesktopClock;
 
 public partial class SettingsWindow : Window
 {
-    private bool _restoringScrollPosition = true;
-
     public SettingsWindow()
     {
         InitializeComponent();
@@ -208,34 +206,8 @@ public partial class SettingsWindow : Window
         OpenUrl("https://github.com/danielchalmers/DesktopClock/releases");
     }
 
-    private void SettingsScrollViewer_Loaded(object sender, RoutedEventArgs e)
-    {
-        if (!_restoringScrollPosition)
-        {
-            return;
-        }
-
-        Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() =>
-        {
-            SettingsScrollViewer.ScrollToVerticalOffset(ViewModel.Settings.SettingsScrollPosition);
-            ViewModel.Settings.SettingsScrollPosition = SettingsScrollViewer.VerticalOffset;
-            _restoringScrollPosition = false;
-        }));
-    }
-
-    private void SettingsScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
-    {
-        if (_restoringScrollPosition)
-        {
-            return;
-        }
-
-        ViewModel.Settings.SettingsScrollPosition = e.VerticalOffset;
-    }
-
     private void SettingsWindow_Closing(object sender, CancelEventArgs e)
     {
-        ViewModel.Settings.SettingsScrollPosition = SettingsScrollViewer.VerticalOffset;
         ViewModel.Dispose();
     }