Skip to content

Commit

Permalink
Cool colorsss
Browse files Browse the repository at this point in the history
  • Loading branch information
BigSpice committed Oct 21, 2023
1 parent 63a0561 commit 522eb2f
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 5 deletions.
Binary file modified VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 9 additions & 3 deletions VTOL_2.0.0/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
RenderOptions.ClearTypeHint="Enabled"
mc:Ignorable="d"

Title="MainWindow" Height="700" Width="1201" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" Background="Black" AllowDrop="True" GotFocus="Main_Win_Control_GotFocus" LostFocus="Main_Win_Control_LostFocus" Deactivated="Main_Win_Control_Deactivated" Activated="Main_Win_Control_Activated" Closed="Main_Win_Control_Closed" StateChanged="Main_Win_Control_StateChanged" Loaded="Main_Win_Control_Loaded" Closing="Main_Win_Control_Closing"
Title="MainWindow" Height="700" Width="1201" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" AllowDrop="True" GotFocus="Main_Win_Control_GotFocus" LostFocus="Main_Win_Control_LostFocus" Deactivated="Main_Win_Control_Deactivated" Activated="Main_Win_Control_Activated" Closed="Main_Win_Control_Closed" StateChanged="Main_Win_Control_StateChanged" Loaded="Main_Win_Control_Loaded" Closing="Main_Win_Control_Closing" BorderBrush="#B27F7F7F" BorderThickness="1,1,1,1"

>

Expand Down Expand Up @@ -102,6 +102,12 @@


</Window.Resources>
<Window.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF003125" Offset="0.957"/>
<GradientStop Color="#FF000603" Offset="0.31"/>
</LinearGradientBrush>
</Window.Background>



Expand Down Expand Up @@ -173,10 +179,10 @@
<Grid>
<Border
x:Name="mask"
Background="{ui:ThemeResource}"
CornerRadius="8"
CornerRadius="8" Background="#FF0E0E0E"
/>
<!--="#FF171717"-->
<!-- CornerRadius="8"-->

<!--<ui:Breadcrumb
Margin="10,10,0,0"
Expand Down
34 changes: 34 additions & 0 deletions VTOL_2.0.0/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Animation;
using VTOL.Pages;
Expand Down Expand Up @@ -81,7 +83,35 @@ public partial class MainWindow : Window
bool failed_folder = false;
public bool minimize_to_tray = false;

// The enum flag for DwmSetWindowAttribute's second parameter, which tells the function what attribute to set.
// Copied from dwmapi.h





public enum DWMWINDOWATTRIBUTE
{
DWMWA_WINDOW_CORNER_PREFERENCE = 33
}

// The DWM_WINDOW_CORNER_PREFERENCE enum for DwmSetWindowAttribute's third parameter, which tells the function
// what value of the enum to set.
// Copied from dwmapi.h
public enum DWM_WINDOW_CORNER_PREFERENCE
{
DWMWCP_DEFAULT = 0,
DWMWCP_DONOTROUND = 1,
DWMWCP_ROUND = 2,
DWMWCP_ROUNDSMALL = 3
}

// Import dwmapi.dll and define DwmSetWindowAttribute in C# corresponding to the native function.
[DllImport("dwmapi.dll", CharSet = CharSet.Unicode, PreserveSig = false)]
internal static extern void DwmSetWindowAttribute(IntPtr hwnd,
DWMWINDOWATTRIBUTE attribute,
ref DWM_WINDOW_CORNER_PREFERENCE pvAttribute,
uint cbAttribute);
public string ProductVersion
{
get
Expand Down Expand Up @@ -112,6 +142,10 @@ private void UserInterfaceCustomScale(double customScale)
public MainWindow()
{
InitializeComponent();
IntPtr hWnd = new WindowInteropHelper(GetWindow(this)).EnsureHandle();
var attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE;
var preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;
DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint));

try
{
Expand Down
4 changes: 2 additions & 2 deletions VTOL_2.0.0/VTOL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Icons\EA.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Icons\Origin.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Resource_Static\Advocate_banner.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down

0 comments on commit 522eb2f

Please sign in to comment.