mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 09:04:09 +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
|
||||
|
||||
- name: Setup .NET 9
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
dotnet-version: 9.0.x
|
||||
|
||||
@@ -142,7 +142,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup .NET 9
|
||||
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
||||
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
|
||||
with:
|
||||
dotnet-version: 9.0.x
|
||||
|
||||
|
||||
@@ -1009,14 +1009,12 @@ public partial class Scenarios : UserControl
|
||||
int thumbH = AppServices.Current.Settings.LargeThumbnails ? 64 : 32;
|
||||
|
||||
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
|
||||
? MiniTextures.Sharp(new Image
|
||||
{
|
||||
Source = bmp,
|
||||
Height = thumbH,
|
||||
Stretch = Avalonia.Media.Stretch.Fill,
|
||||
Stretch = Avalonia.Media.Stretch.Uniform,
|
||||
Margin = new Thickness(0)
|
||||
})
|
||||
: MiniTextures.MissingVisual(train.SkinFile, thumbH);
|
||||
@@ -1024,22 +1022,6 @@ public partial class Scenarios : UserControl
|
||||
bool selected = !string.IsNullOrEmpty(train.Name) &&
|
||||
string.Equals(train.Name, AppServices.Current.State.StartingVehicleName,
|
||||
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
|
||||
{
|
||||
@@ -1228,9 +1210,7 @@ public partial class Scenarios : UserControl
|
||||
var source = consistStack.Children[i];
|
||||
// The ghost mirrors what the slot shows, stand-in wagons included, so
|
||||
// dragging a vehicle with no thumbnail still carries something visible.
|
||||
// The picked vehicle's picture sits under its frame.
|
||||
var shown = source is Border { Child: Panel { Children: [Image framed, ..] } } ? framed : (source as Border)?.Child;
|
||||
Control copy = shown is Image image
|
||||
Control copy = source is Border { Child: Image image }
|
||||
? new Image { Source = image.Source, Height = image.Height, Stretch = image.Stretch }
|
||||
: MiniTextures.MissingVisual(null, (int)source.Bounds.Height);
|
||||
panel.Children.Add(copy);
|
||||
|
||||
Reference in New Issue
Block a user