Skip to content

Commit 0de0cd6

Browse files
committed
feat: Implement Sprint 3 - Modern Editor and Overlay Improvements
Major Features: - Modern CommandBar with frequently used tools - Properties panel with quick color palette - Status bar showing image size, edit count, zoom level - Improved undo/redo with proper history stack - Zoom controls (zoom in/out/fit) with visual feedback - Floating zoom controls in editor Editor Improvements: - Reorganized layout: CommandBar → Canvas+Properties → Status Bar - Tool selection with visual feedback (Primary appearance) - Quick color selection palette (10 preset colors) - Real-time status updates for current tool and history - Better history management: tracks position for redo support - ScrollViewer for canvas with zoom transformation Overlay Enhancements: - Keyboard shortcuts panel with animations (F1 to toggle) - ESC: Cancel selection - Enter: Confirm selection - F1: Toggle help - Space: Capture full screen - Real-time selection dimensions display - Modern selection UI with corner handles - Crosshair guides for precise selection - Quick action toolbar (Capture/Cancel buttons) - Configurable mask color and opacity - Smooth fade animations for help panel - Cross cursor for better precision Technical Changes: - Added historyIndex for proper undo/redo stack - Implemented RemoveRange for redo stack cleanup - Added UpdateStatusBar() method for real-time UI updates - Zoom transformation using ScaleTransform - Animated help panel with DoubleAnimation - Modern WPF UI controls (Wpf.Ui.Controls.Button) This completes the core functionality of Sprint 3 as outlined in docs/planning/sprint-3-tasks.md
1 parent 53259d7 commit 0de0cd6

4 files changed

Lines changed: 894 additions & 295 deletions

File tree

Views/Overlays/ScreenshotOverlay.xaml

Lines changed: 152 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,156 @@
55
Background="Transparent"
66
WindowStyle="None"
77
ShowInTaskbar="False"
8-
Topmost="True">
9-
<Grid Background="Transparent" />
8+
Topmost="True"
9+
Cursor="Cross">
10+
<Grid x:Name="RootGrid" Background="Transparent">
11+
<!-- Help Panel - Keyboard Shortcuts -->
12+
<Border x:Name="HelpPanel"
13+
Background="#E0000000"
14+
CornerRadius="8"
15+
Padding="20"
16+
HorizontalAlignment="Center"
17+
VerticalAlignment="Top"
18+
Margin="0,40,0,0"
19+
Opacity="0">
20+
<Border.Effect>
21+
<DropShadowEffect BlurRadius="20" ShadowDepth="0" Opacity="0.5"/>
22+
</Border.Effect>
23+
<StackPanel>
24+
<TextBlock Text="Szybkie zaznaczanie - Skróty klawiszowe"
25+
Foreground="White"
26+
FontSize="16"
27+
FontWeight="SemiBold"
28+
HorizontalAlignment="Center"
29+
Margin="0,0,0,12"/>
30+
<Grid>
31+
<Grid.RowDefinitions>
32+
<RowDefinition Height="Auto"/>
33+
<RowDefinition Height="Auto"/>
34+
<RowDefinition Height="Auto"/>
35+
<RowDefinition Height="Auto"/>
36+
</Grid.RowDefinitions>
37+
<Grid.ColumnDefinitions>
38+
<ColumnDefinition Width="Auto"/>
39+
<ColumnDefinition Width="*"/>
40+
</Grid.ColumnDefinitions>
41+
42+
<Border Grid.Row="0" Grid.Column="0" Background="#40FFFFFF" CornerRadius="4" Padding="8,4" Margin="0,0,12,8">
43+
<TextBlock Text="ESC" Foreground="White" FontWeight="Bold"/>
44+
</Border>
45+
<TextBlock Grid.Row="0" Grid.Column="1" Text="Anuluj zaznaczanie" Foreground="White" VerticalAlignment="Center" Margin="0,0,0,8"/>
46+
47+
<Border Grid.Row="1" Grid.Column="0" Background="#40FFFFFF" CornerRadius="4" Padding="8,4" Margin="0,0,12,8">
48+
<TextBlock Text="Enter" Foreground="White" FontWeight="Bold"/>
49+
</Border>
50+
<TextBlock Grid.Row="1" Grid.Column="1" Text="Potwierdź zaznaczenie" Foreground="White" VerticalAlignment="Center" Margin="0,0,0,8"/>
51+
52+
<Border Grid.Row="2" Grid.Column="0" Background="#40FFFFFF" CornerRadius="4" Padding="8,4" Margin="0,0,12,8">
53+
<TextBlock Text="F1" Foreground="White" FontWeight="Bold"/>
54+
</Border>
55+
<TextBlock Grid.Row="2" Grid.Column="1" Text="Pokaż/ukryj tę pomoc" Foreground="White" VerticalAlignment="Center" Margin="0,0,0,8"/>
56+
57+
<Border Grid.Row="3" Grid.Column="0" Background="#40FFFFFF" CornerRadius="4" Padding="8,4" Margin="0,0,12,0">
58+
<TextBlock Text="Spacja" Foreground="White" FontWeight="Bold"/>
59+
</Border>
60+
<TextBlock Grid.Row="3" Grid.Column="1" Text="Pełny ekran" Foreground="White" VerticalAlignment="Center"/>
61+
</Grid>
62+
</StackPanel>
63+
</Border>
64+
65+
<!-- Selection Info Panel -->
66+
<Border x:Name="InfoPanel"
67+
Background="#E0000000"
68+
CornerRadius="4"
69+
Padding="12,6"
70+
HorizontalAlignment="Left"
71+
VerticalAlignment="Top"
72+
Margin="20,20,0,0"
73+
Visibility="Collapsed">
74+
<StackPanel Orientation="Horizontal">
75+
<TextBlock x:Name="InfoText"
76+
Text="0 x 0 px"
77+
Foreground="White"
78+
FontSize="14"
79+
FontWeight="SemiBold"/>
80+
</StackPanel>
81+
</Border>
82+
83+
<!-- Quick Action Toolbar (shown during selection) -->
84+
<Border x:Name="QuickToolbar"
85+
Background="#E0000000"
86+
CornerRadius="8"
87+
Padding="8"
88+
HorizontalAlignment="Center"
89+
VerticalAlignment="Bottom"
90+
Margin="0,0,0,40"
91+
Visibility="Collapsed">
92+
<Border.Effect>
93+
<DropShadowEffect BlurRadius="15" ShadowDepth="0" Opacity="0.4"/>
94+
</Border.Effect>
95+
<StackPanel Orientation="Horizontal">
96+
<Button x:Name="BtnCapture"
97+
Content="✓ Przechwyć"
98+
Click="OnCaptureClick"
99+
Padding="16,8"
100+
Margin="0,0,8,0"
101+
Background="#FF0078D4"
102+
Foreground="White"
103+
BorderThickness="0"
104+
FontWeight="SemiBold"
105+
Cursor="Hand">
106+
<Button.Style>
107+
<Style TargetType="Button">
108+
<Setter Property="Template">
109+
<Setter.Value>
110+
<ControlTemplate TargetType="Button">
111+
<Border Background="{TemplateBinding Background}"
112+
CornerRadius="4"
113+
Padding="{TemplateBinding Padding}">
114+
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
115+
</Border>
116+
</ControlTemplate>
117+
</Setter.Value>
118+
</Setter>
119+
<Style.Triggers>
120+
<Trigger Property="IsMouseOver" Value="True">
121+
<Setter Property="Background" Value="#FF1084E8"/>
122+
</Trigger>
123+
</Style.Triggers>
124+
</Style>
125+
</Button.Style>
126+
</Button>
127+
<Button x:Name="BtnCancel"
128+
Content="✕ Anuluj"
129+
Click="OnCancelClick"
130+
Padding="16,8"
131+
Background="#40FFFFFF"
132+
Foreground="White"
133+
BorderThickness="0"
134+
FontWeight="SemiBold"
135+
Cursor="Hand">
136+
<Button.Style>
137+
<Style TargetType="Button">
138+
<Setter Property="Template">
139+
<Setter.Value>
140+
<ControlTemplate TargetType="Button">
141+
<Border Background="{TemplateBinding Background}"
142+
CornerRadius="4"
143+
Padding="{TemplateBinding Padding}">
144+
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
145+
</Border>
146+
</ControlTemplate>
147+
</Setter.Value>
148+
</Setter>
149+
<Style.Triggers>
150+
<Trigger Property="IsMouseOver" Value="True">
151+
<Setter Property="Background" Value="#60FFFFFF"/>
152+
</Trigger>
153+
</Style.Triggers>
154+
</Style>
155+
</Button.Style>
156+
</Button>
157+
</StackPanel>
158+
</Border>
159+
</Grid>
10160
</Window>

0 commit comments

Comments
 (0)