mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 00:58:12 +01:00
Compare commits
1 Commits
fix/consis
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
664fa17a66 |
4
.github/workflows/dotnet.yml
vendored
4
.github/workflows/dotnet.yml
vendored
@@ -52,7 +52,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup .NET 9
|
- name: Setup .NET 9
|
||||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup .NET 9
|
- name: Setup .NET 9
|
||||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
|
|
||||||
|
|||||||
@@ -1009,14 +1009,12 @@ public partial class Scenarios : UserControl
|
|||||||
int thumbH = AppServices.Current.Settings.LargeThumbnails ? 64 : 32;
|
int thumbH = AppServices.Current.Settings.LargeThumbnails ? 64 : 32;
|
||||||
|
|
||||||
var bmp = LoadMini(miniName, thumbH);
|
var bmp = LoadMini(miniName, thumbH);
|
||||||
// Fill, not Uniform: at a scale such as 125 % layout rounds the slot up to whole pixels,
|
|
||||||
// and a mini keeping its own width inside it left a line of the background between two vehicles.
|
|
||||||
Control visual = bmp is not null
|
Control visual = bmp is not null
|
||||||
? MiniTextures.Sharp(new Image
|
? MiniTextures.Sharp(new Image
|
||||||
{
|
{
|
||||||
Source = bmp,
|
Source = bmp,
|
||||||
Height = thumbH,
|
Height = thumbH,
|
||||||
Stretch = Avalonia.Media.Stretch.Fill,
|
Stretch = Avalonia.Media.Stretch.Uniform,
|
||||||
Margin = new Thickness(0)
|
Margin = new Thickness(0)
|
||||||
})
|
})
|
||||||
: MiniTextures.MissingVisual(train.SkinFile, thumbH);
|
: MiniTextures.MissingVisual(train.SkinFile, thumbH);
|
||||||
@@ -1024,22 +1022,6 @@ public partial class Scenarios : UserControl
|
|||||||
bool selected = !string.IsNullOrEmpty(train.Name) &&
|
bool selected = !string.IsNullOrEmpty(train.Name) &&
|
||||||
string.Equals(train.Name, AppServices.Current.State.StartingVehicleName,
|
string.Equals(train.Name, AppServices.Current.State.StartingVehicleName,
|
||||||
StringComparison.OrdinalIgnoreCase);
|
StringComparison.OrdinalIgnoreCase);
|
||||||
// The vehicle started in gets a frame over its picture as well as the lines above and below:
|
|
||||||
// two thin lines alone were hard to see. Drawn over the picture, it moves no vehicle aside.
|
|
||||||
if (selected)
|
|
||||||
visual = new Panel
|
|
||||||
{
|
|
||||||
Children =
|
|
||||||
{
|
|
||||||
visual,
|
|
||||||
new Border
|
|
||||||
{
|
|
||||||
BorderThickness = new Thickness(3),
|
|
||||||
BorderBrush = SelectedVehicleBrush,
|
|
||||||
IsHitTestVisible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var slot = new Border
|
var slot = new Border
|
||||||
{
|
{
|
||||||
@@ -1228,9 +1210,7 @@ public partial class Scenarios : UserControl
|
|||||||
var source = consistStack.Children[i];
|
var source = consistStack.Children[i];
|
||||||
// The ghost mirrors what the slot shows, stand-in wagons included, so
|
// The ghost mirrors what the slot shows, stand-in wagons included, so
|
||||||
// dragging a vehicle with no thumbnail still carries something visible.
|
// dragging a vehicle with no thumbnail still carries something visible.
|
||||||
// The picked vehicle's picture sits under its frame.
|
Control copy = source is Border { Child: Image image }
|
||||||
var shown = source is Border { Child: Panel { Children: [Image framed, ..] } } ? framed : (source as Border)?.Child;
|
|
||||||
Control copy = shown is Image image
|
|
||||||
? new Image { Source = image.Source, Height = image.Height, Stretch = image.Stretch }
|
? new Image { Source = image.Source, Height = image.Height, Stretch = image.Stretch }
|
||||||
: MiniTextures.MissingVisual(null, (int)source.Bounds.Height);
|
: MiniTextures.MissingVisual(null, (int)source.Bounds.Height);
|
||||||
panel.Children.Add(copy);
|
panel.Children.Add(copy);
|
||||||
|
|||||||
Reference in New Issue
Block a user