diff --git a/scripts/linux/headless-run.sh b/scripts/linux/headless-run.sh index 001338db00b4..befbe32c481a 100755 --- a/scripts/linux/headless-run.sh +++ b/scripts/linux/headless-run.sh @@ -9,6 +9,7 @@ # FILES_SANDBOX_SEED (optional script run as "script " after the default sample content is created), # FILES_HEADLESS_WM (optional window manager command to run on the private display, e.g. "kwin_x11"; default none), # FILES_EXEC (path to a packaged launcher, e.g. Files-x86_64.AppImage or packaging/linux/files; run instead of "dotnet Files.dll"), +# FILES_HEADLESS_XFT_DPI (optional Xft.dpi for the private display, e.g. 144 = 1.5x), UNO_DISPLAY_SCALE_OVERRIDE (passed through), # FILES_BIN (default src/Files.App/bin/Debug/net10.0-desktop), XVFB_SIZE (default 1600x1000). set -euo pipefail @@ -60,6 +61,10 @@ if [[ -n "${FILES_HEADLESS_WM:-}" ]]; then sleep 3 fi +# Optional HiDPI test: FILES_HEADLESS_XFT_DPI=120 writes Xft.dpi into the private display's X resources (Uno derives the scale from it); +# UNO_DISPLAY_SCALE_OVERRIDE=1.5 is passed through to the app as is. +[[ -n "${FILES_HEADLESS_XFT_DPI:-}" ]] && echo "Xft.dpi: ${FILES_HEADLESS_XFT_DPI}" | DISPLAY=":$display" xrdb -merge + shot() { ffmpeg -loglevel error -y -f x11grab -video_size "$size" -i ":$display" -frames:v 1 "$outdir/$1.png" echo "screenshot: $outdir/$1.png" diff --git a/src/Files.App/Data/Contracts/IAppearanceSettingsService.cs b/src/Files.App/Data/Contracts/IAppearanceSettingsService.cs index eec23d241fa7..ef32360dfcc8 100644 --- a/src/Files.App/Data/Contracts/IAppearanceSettingsService.cs +++ b/src/Files.App/Data/Contracts/IAppearanceSettingsService.cs @@ -102,6 +102,11 @@ public interface IAppearanceSettingsService : IBaseSettingsService, INotifyPrope /// bool ShowToolbar { get; set; } + /// + /// Gets or sets a value whether the Sort and Layout toolbar buttons show a text label next to the icon. + /// + bool ShowToolbarSortViewLabels { get; set; } + /// /// Gets or sets a value whether the status bar should be displayed. /// diff --git a/src/Files.App/Helpers/Application/AppToastNotificationHelper.cs b/src/Files.App/Helpers/Application/AppToastNotificationHelper.cs index a73201c093bd..3bfb070c4e06 100644 --- a/src/Files.App/Helpers/Application/AppToastNotificationHelper.cs +++ b/src/Files.App/Helpers/Application/AppToastNotificationHelper.cs @@ -31,7 +31,11 @@ public static void ShowDriveEjectToast() var toastContent = new AppNotificationBuilder() .AddText(Strings.EjectNotificationHeader.GetLocalizedResource()) .AddText(Strings.EjectNotificationBody.GetLocalizedResource()) - .SetAttributionText("SettingsAboutAppName".GetLocalizedResource()) +#if WINDOWS + .SetAttributionText("Files") +#else + .SetAttributionText(Strings.LinuxAppDisplayName.GetLocalizedResource()) +#endif .BuildNotification(); AppNotificationManager.Default.Show(toastContent); } diff --git a/src/Files.App/Platforms/Desktop/Program.cs b/src/Files.App/Platforms/Desktop/Program.cs index 5243019ea026..1e4cb3106c8d 100644 --- a/src/Files.App/Platforms/Desktop/Program.cs +++ b/src/Files.App/Platforms/Desktop/Program.cs @@ -44,6 +44,9 @@ public static int Main(string[] args) LaunchArguments = args; + // Uno reads Xft.dpi itself; this covers sessions that only export GDK/Qt scale variables + Files.Platform.Linux.Windowing.DisplayScaleResolver.ApplyToProcess(); + // Single instance: D-Bus name (socket fallback). A second launch forwards its arguments to the running instance and exits. // FILES_NO_SINGLE_INSTANCE=1 skips this (for running several instances side by side while developing). var noSingleInstance = Environment.GetEnvironmentVariable("FILES_NO_SINGLE_INSTANCE") == "1"; diff --git a/src/Files.App/Platforms/Desktop/WindowEx.cs b/src/Files.App/Platforms/Desktop/WindowEx.cs index d9a0430c83e7..2620a7cd8548 100644 --- a/src/Files.App/Platforms/Desktop/WindowEx.cs +++ b/src/Files.App/Platforms/Desktop/WindowEx.cs @@ -89,15 +89,17 @@ private void AppWindow_Changed(AppWindow sender, AppWindowChangedEventArgs args) } /// - /// Sizes the window to 80% of the primary work area (at most 1280x800 scaled up to 1600x1000 on big screens), centered. + /// Sizes the window to 80% of the primary work area (capped at 1600x1000 logical pixels), centered. /// private void ApplyDefaultSize() { try { var work = DisplayArea.Primary.WorkArea; - var width = Math.Clamp((int)(work.Width * 0.8), Math.Min(MinWidth, work.Width), 1600); - var height = Math.Clamp((int)(work.Height * 0.8), Math.Min(MinHeight, work.Height), 1000); + // AppWindow sizes are physical pixels; the caps are logical + var scale = Files.Platform.Linux.Windowing.DisplayScaleResolver.GetEffectiveScale(); + var width = Math.Clamp((int)(work.Width * 0.8), Math.Min((int)(MinWidth * scale), work.Width), (int)(1600 * scale)); + var height = Math.Clamp((int)(work.Height * 0.8), Math.Min((int)(MinHeight * scale), work.Height), (int)(1000 * scale)); AppWindow.Resize(new Windows.Graphics.SizeInt32 { Width = width, Height = height }); AppWindow.Move(new Windows.Graphics.PointInt32 { X = work.X + (work.Width - width) / 2, Y = work.Y + (work.Height - height) / 2 }); } diff --git a/src/Files.App/Services/Settings/AppearanceSettingsService.cs b/src/Files.App/Services/Settings/AppearanceSettingsService.cs index cedf2d48b5dd..30fecabb3f81 100644 --- a/src/Files.App/Services/Settings/AppearanceSettingsService.cs +++ b/src/Files.App/Services/Settings/AppearanceSettingsService.cs @@ -142,6 +142,13 @@ public bool ShowToolbar set => Set(value); } + /// + public bool ShowToolbarSortViewLabels + { + get => Get(true); + set => Set(value); + } + /// public bool ShowStatusBar { diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index d91255a55186..579b34890061 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4993,6 +4993,27 @@ File System + + Toggle sidebar + + + Show or hide details + + + Show labels on the Sort and Layout buttons + + + Error + + + Folder + + + Commits: {0} + + + Preparing... + This service-menu action will run the command shown below on your selection. Only run actions from sources you trust. diff --git a/src/Files.App/Strings/fil-PH/Resources.resw b/src/Files.App/Strings/fil-PH/Resources.resw index b601d123b47a..283ddddf4fcb 100644 --- a/src/Files.App/Strings/fil-PH/Resources.resw +++ b/src/Files.App/Strings/fil-PH/Resources.resw @@ -117,18 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Kopyahin ang daan Kopyahin ang Path - - - Kopyahin ang path ng item kasama ang quotes @@ -168,12 +162,6 @@ Piliin lahat - - - - - - Nabago: @@ -309,9 +297,6 @@ Burahin - - - Welcome to Files! diff --git a/src/Files.App/Strings/hi-IN/Resources.resw b/src/Files.App/Strings/hi-IN/Resources.resw index 9335f5c36e46..96a06018eb09 100644 --- a/src/Files.App/Strings/hi-IN/Resources.resw +++ b/src/Files.App/Strings/hi-IN/Resources.resw @@ -126,9 +126,6 @@ Copy item path - - - Copy selected item path with quotes diff --git a/src/Files.App/Strings/id-ID/Resources.resw b/src/Files.App/Strings/id-ID/Resources.resw index 1c66d6537669..cd5495910994 100644 --- a/src/Files.App/Strings/id-ID/Resources.resw +++ b/src/Files.App/Strings/id-ID/Resources.resw @@ -3297,9 +3297,6 @@ Properti - - - Buka jendela properti diff --git a/src/Files.App/Styles/ToolbarButtonStyle.xaml b/src/Files.App/Styles/ToolbarButtonStyle.xaml index fd6432c663f3..cc8607125428 100644 --- a/src/Files.App/Styles/ToolbarButtonStyle.xaml +++ b/src/Files.App/Styles/ToolbarButtonStyle.xaml @@ -13,7 +13,7 @@ - + diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml index 5814143d22d1..ab7b608d2fce 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml +++ b/src/Files.App/UserControls/NavigationToolbar.xaml @@ -101,7 +101,7 @@ Height="32" Padding="0" x:Load="{x:Bind IsSidebarPaneOpenToggleButtonVisible, Mode=OneWay}" - AutomationProperties.Name="ToggleSidebarPane" + AutomationProperties.Name="{helpers:ResourceString Key=ToggleSidebarPane}" Background="Transparent" BorderBrush="Transparent" Click="SidebarPaneToggleButton_Click" @@ -148,6 +148,7 @@