Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/scripts/screenshots.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ public static class Win32 {
[DllImport("user32.dll")] public static extern bool RedrawWindow(IntPtr h, IntPtr rect, IntPtr region, uint flags);
[DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr after, int x, int y, int cx, int cy, uint flags);
[DllImport("dwmapi.dll")] public static extern int DwmGetWindowAttribute(IntPtr h, int attr, out RECT r, int size);
[StructLayout(LayoutKind.Sequential)] public struct POINT { public int X, Y; }
[StructLayout(LayoutKind.Sequential)] public struct CURSORINFO { public int cbSize; public int flags; public IntPtr hCursor; public POINT pt; }
[DllImport("user32.dll")] public static extern bool SetCursorPos(int x, int y);
[DllImport("user32.dll")] public static extern bool GetCursorInfo(ref CURSORINFO ci);
[DllImport("user32.dll")] public static extern IntPtr LoadCursor(IntPtr instance, IntPtr name);
public static IntPtr CurrentCursor() {
CURSORINFO ci = new CURSORINFO();
ci.cbSize = Marshal.SizeOf(ci);
return GetCursorInfo(ref ci) ? ci.hCursor : IntPtr.Zero;
}
}
"@
[Win32]::SetProcessDPIAware() | Out-Null
Expand Down Expand Up @@ -237,6 +247,32 @@ foreach ($sub in (Visible-Tabs $payloadTab)) {
Save-Window ('{0:D2}-payload-{1}' -f $i, ($sub.Current.Name -replace '[^A-Za-z0-9]+', '-').Trim('-').ToLower()); $i++
}

# ---------------------------------------------------------------- the mouse cursor
# The hand belongs on what can be clicked: a navigation entry shows it, the page it opens
# does not. (A cursor set on a tab used to reach the whole page under it.)
function Cursor-Over($element) {
$r = $element.Current.BoundingRectangle
$x = [int]($r.X + $r.Width / 2); $y = [int]($r.Y + $r.Height / 2)
[Win32]::SetForegroundWindow($script:hwnd) | Out-Null
[Win32]::SetCursorPos($x, $y) | Out-Null
Start-Sleep -Milliseconds 400
[Win32]::SetCursorPos($x + 2, $y + 1) | Out-Null # a move makes WPF ask for the cursor again
Start-Sleep -Milliseconds 400
return [Win32]::CurrentCursor()
}
$arrow = [Win32]::LoadCursor([IntPtr]::Zero, [IntPtr]32512) # IDC_ARROW
$hand = [Win32]::LoadCursor([IntPtr]::Zero, [IntPtr]32649) # IDC_HAND
Select-Item (Visible-Tabs $payloadTab)[0] # the loop above left the last sub-tab open
$onPage = Cursor-Over (Wait-For { Shown $root 'payload_info' } 10 "the payload properties")
$onNav = Cursor-Over (Wait-For { By-Id $mainTabs 'device_tab' } 10 "the Device entry")
Write-Host "cursor over the page: $onPage (arrow $arrow), over a navigation entry: $onNav (hand $hand)"
if ($onPage -eq [IntPtr]::Zero -or $onNav -eq [IntPtr]::Zero) {
Write-Host "the runner reports no cursor; skipping the cursor check"
} else {
if ($onPage -ne $arrow) { Fail "the payload page shows a cursor other than the arrow" }
if ($onNav -ne $hand) { Fail "a navigation entry does not show the hand cursor" }
}

# ---------------------------------------------------------------- device list and device
$deviceTab = Go 'device_tab'
$devices = Wait-For { By-Id $root 'fastboot_devices_list' } 10 "the device list"
Expand Down
11 changes: 7 additions & 4 deletions Themes/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="bd" Property="Opacity" Value="0.4"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down Expand Up @@ -279,6 +280,7 @@
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.45"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down Expand Up @@ -316,6 +318,7 @@
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.45"/>
<Setter Property="Cursor" Value="Arrow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down Expand Up @@ -480,15 +483,16 @@
</Setter>
</Style>

<!-- The hand cursor sits on the header border, not on the TabItem: a Cursor set on the
TabItem also reaches the whole page it shows, which then looked clickable everywhere. -->
<Style TargetType="TabItem">
<Setter Property="Foreground" Value="{StaticResource Dim}"/>
<Setter Property="FontSize" Value="12.5"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="bd" Background="Transparent" CornerRadius="7" Padding="14,6" Margin="0,0,2,0">
<Border x:Name="bd" Background="Transparent" CornerRadius="7" Padding="14,6" Margin="0,0,2,0" Cursor="Hand">
<ContentPresenter ContentSource="Header" VerticalAlignment="Center" RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
Expand All @@ -510,12 +514,11 @@
<Style x:Key="NavItem" TargetType="TabItem">
<Setter Property="Foreground" Value="{StaticResource Dim}"/>
<Setter Property="FontSize" Value="13.5"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="bd" Background="Transparent" CornerRadius="8" Height="40" Margin="0,1">
<Border x:Name="bd" Background="Transparent" CornerRadius="8" Height="40" Margin="0,1" Cursor="Hand">
<Grid>
<Border x:Name="bar" Width="3" CornerRadius="2" Margin="0,10" HorizontalAlignment="Left"
Background="{StaticResource Accent}" Visibility="Collapsed"/>
Expand Down
Binary file modified docs/screenshots/06-device-basic-properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/07-device-partitions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/08-confirm-erase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/10-flash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/18-backup-fastboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/21-backup-files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/22-backup-partitions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/23-backup-done.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/24-images-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/25-images-super.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/27-images-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/28-images-qualcomm-pieces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/29-super-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/30-super-imported.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/32-logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/33-about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/ar-01-payload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/ar-02-device.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/screenshots/ar-08-images-super.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.