Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Jun 3, 2024
1 parent 61effe6 commit 56acc44
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 14 deletions.
6 changes: 6 additions & 0 deletions src/ColorMC.Core/Helpers/JavaHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ private static List<string> GetOracleJavaInstallPath(string javaKeyPath)
path.Add(home);
}
}

return path;
}
catch
{
Expand Down Expand Up @@ -196,6 +198,8 @@ private static List<string> GetAdoptiumJavaInstallPath(string javaKeyPath)
path.Add(home);
}
}

return path;
}
catch
{
Expand Down Expand Up @@ -223,6 +227,8 @@ private static List<string> GetZuluJavaInstallPath(string javaKeyPath)
path.Add(home);
}
}

return path;
}
catch
{
Expand Down
6 changes: 5 additions & 1 deletion src/ColorMC.Gui/UI/Controls/Add/AddControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ public AddControl(GameSettingObj obj) : this()

private void ScrollViewer1_ScrollChanged(object? sender, ScrollChangedEventArgs e)
{
if (e.ExtentDelta == e.OffsetDelta)
if (e.ExtentDelta == e.OffsetDelta || e.ExtentDelta.Y < 0)
{
return;
}
if (DataContext is AddControlModel model)
{
if (model.EmptyDisplay)
{
return;
}
model.DisplayFilter = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Controls/Add/AddGameControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void SetGroup(string? group)
{
if (DataContext is AddGameModel model)
{
model.Group = group;
model.Group ??= group;
}
}
}
18 changes: 9 additions & 9 deletions src/ColorMC.Gui/UI/Controls/Add/AddModPackControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@
</Border>

<Panel Margin="0,5,0,0">
<Border
Margin="0,0,0,5"
Classes="t1"
IsVisible="{Binding EmptyDisplay}">
<TextBlock
HorizontalAlignment="Center"
FontSize="30"
Text="{setting:Localize AddModPackWindow.Text13}" />
</Border>
<ScrollViewer Name="ScrollViewer1" VerticalScrollBarVisibility="Visible">
<ItemsControl
HorizontalAlignment="Stretch"
Expand All @@ -121,6 +112,15 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<Border
Margin="0,0,0,5"
Classes="t1"
IsVisible="{Binding EmptyDisplay}">
<TextBlock
HorizontalAlignment="Center"
FontSize="30"
Text="{setting:Localize AddModPackWindow.Text13}" />
</Border>
</Panel>
</DockPanel>

Expand Down
6 changes: 5 additions & 1 deletion src/ColorMC.Gui/UI/Controls/Add/AddModPackControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ public AddModPackControl()

private void ScrollViewer1_ScrollChanged(object? sender, ScrollChangedEventArgs e)
{
if (e.ExtentDelta == e.OffsetDelta)
if (e.ExtentDelta == e.OffsetDelta || e.ExtentDelta.Y < 0)
{
return;
}
if (DataContext is AddModPackControlModel model)
{
if (model.EmptyDisplay)
{
return;
}
model.DisplayFilter = false;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/ColorMC.Gui/UI/Controls/Download/DownloadControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
Background="{setting:Colors TranBack}"
mc:Ignorable="d">
<DockPanel Margin="5">
<Border Classes="t1" DockPanel.Dock="Top">
<Border
Margin="5"
Classes="t1"
DockPanel.Dock="Top">
<WrapPanel>
<ProgressBar
Height="20"
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Controls/Setting/SettingControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public SettingControl()
UseName = ToString() ?? "SettingControl";
}

public SettingControl(int mainversion) : base()
public SettingControl(int mainversion) : this()
{
_needJava = mainversion;
}
Expand Down
2 changes: 2 additions & 0 deletions src/TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
⚫2024.6.3
改进部分UI okl
修复JAVA扫描问题 okl
修复设置界面问题 okl

⚫2024.5.25
修复窗口图标显示问题 okl
Expand Down

0 comments on commit 56acc44

Please sign in to comment.