Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
meetox80 committed May 28, 2023
1 parent 6f4ed9a commit 5c3f4d5
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<img width="100%" src="https://github.com/lemonekq/betterlauncher-nextgen/blob/main/branding/1.png?raw=true">
<img width="100%" src="https://github.com/lemonekq/betterlauncher-nextgen/blob/main/branding/2.png?raw=true">
<img width="100%" src="https://github.com/lemonekq/betterlauncher-nextgen/blob/main/branding/bottom_after.png?raw=true">
<img width="100%" src="https://github.com/lemonekq/betterlauncher-nextgen/blob/main/branding/disclaimer.png?raw=true">
</p>

<!-- desc, etc... -->
Expand Down
Binary file added branding/disclaimer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added branding/disclaimer.psd
Binary file not shown.
11 changes: 11 additions & 0 deletions src/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -617,5 +617,16 @@
</EventTrigger>
</Label.Triggers>
</Label>


<!-- Profile section -->

<Rectangle x:Name="profile_handler" Fill="#3F000000" RadiusX="10" RadiusY="10" Height="50" Width="175" Margin="1132,158,193,692"/>
<Rectangle x:Name="profile_image" Height="50" Width="50" Margin="1132,158,318,692" RadiusX="7.5" RadiusY="7.5">
<Rectangle.Fill>
<ImageBrush x:Name="profile_image_imagebrush" ImageSource="https://mc-heads.net/avatar/-"/>
</Rectangle.Fill>
</Rectangle>
<TextBlock Text="Click to login" FontFamily="Fonts/#Proxima Nova" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="1182,168,193,704" />
</Grid>
</Window>
24 changes: 23 additions & 1 deletion src/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System.Windows;
using Microsoft.Win32;
using System;
using System.Runtime.InteropServices;
using System.Windows;

namespace betterlauncher_cs
{
Expand All @@ -9,8 +12,27 @@ public MainWindow()
InitializeComponent();
}

private void SetMonitorScaleTo100Percent()
{
const string dpiRegistryPath = @"HKEY_CURRENT_USER\Control Panel\Desktop";
const string dpiRegistryValue = "LogPixels";
const int WM_DISPLAYCHANGE = 0x007E;
const int HWND_BROADCAST = 0xFFFF;

// Set the DPI value to 96 (100% scale)
Registry.SetValue(dpiRegistryPath, dpiRegistryValue, 96, RegistryValueKind.DWord);

// Notify the system of the DPI change
SendMessage((IntPtr)HWND_BROADCAST, WM_DISPLAYCHANGE, IntPtr.Zero, IntPtr.Zero);
}

[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

private void Window_Initialized(object sender, System.EventArgs e)
{
SetMonitorScaleTo100Percent();

windowhandler_bg.Height = 20; windowhandler_bg.Width = 20;
windowhandler_mask1.Height = 20; windowhandler_mask1.Width = 20;
windowhandler_mask2.Height = 20; windowhandler_mask2.Width = 20;
Expand Down
2 changes: 2 additions & 0 deletions src/betterlauncher-cs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
Expand Down

0 comments on commit 5c3f4d5

Please sign in to comment.