Skip to content

Commit

Permalink
Make Width and Height Responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
xM4ddy committed May 15, 2024
1 parent 7ebcaef commit cd8d549
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
WindowStartupLocation="CenterScreen"
WindowStyle="None"
AllowsTransparency="True"
Title="OFGB - Version 0.2" Height="250" Width="235">
Title="OFGB - Version 0.2"
SizeToContent="WidthAndHeight">
<WindowChrome.WindowChrome>
<WindowChrome
CaptionHeight="30"
Expand Down
20 changes: 10 additions & 10 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,42 +70,42 @@ private void InitializeKeys()
{
// Sync provider notifications in File Explorer
bool key1 = CreateKey(cur_ver + "Explorer\\Advanced", "ShowSyncProviderNotifications");
cb1.IsChecked = !key1;
cb1.IsChecked = key1;

// Get fun facts, tips, tricks, and more on your lock screen
bool key2 = CreateKey(cur_ver + "ContentDeliveryManager", "RotatingLockScreenOverlayEnabled");
bool key3 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-338387Enabled");
cb2.IsChecked = !key2 && !key3;
cb2.IsChecked = key2 && key3;

// Show suggested content in Settings app
bool key4 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-338393Enabled");
bool key5 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-353694Enabled");
bool key6 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-353696Enabled");
cb3.IsChecked = !key4 && !key5 && !key6;
cb3.IsChecked = key4 && key5 && key6;

// Get tips and suggestions when using Windows
bool key7 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-338389Enabled");
cb4.IsChecked = !key7;
cb4.IsChecked = key7;

// Suggest ways to get the most out of Windows and finish setting up this device
bool key8 = CreateKey(cur_ver + "UserProfileEngagement", "ScoobeSystemSettingEnabled");
cb5.IsChecked = !key8;
cb5.IsChecked = key8;

// Show me the Windows welcome experience after updates and occasionally when I sign in to highlight what's new and suggested
bool key9 = CreateKey(cur_ver + "ContentDeliveryManager", "SubscribedContent-310093Enabled");
cb6.IsChecked = !key9;
cb6.IsChecked = key9;

// Let apps show me personalized ads by using my advertising ID
bool key10 = CreateKey(cur_ver + "AdvertisingInfo", "Enabled");
cb7.IsChecked = !key10;
cb7.IsChecked = key10;

// Tailored experiences
bool key11 = CreateKey(cur_ver + "Privacy", "TailoredExperiencesWithDiagnosticDataEnabled");
cb8.IsChecked = !key11;
cb8.IsChecked = key11;

// "Show recommendations for tips, shortcuts, new apps, and more" on Start
bool key12 = CreateKey(cur_ver + "Explorer\\Advanced", "Start_IrisRecommendations");
cb9.IsChecked = !key12;
cb9.IsChecked = key12;
}

private static bool CreateKey(string loc, string key)
Expand All @@ -132,7 +132,7 @@ private static bool CreateKey(string loc, string key)
value = Convert.ToInt32(keyRef.GetValue(key));
keyRef.Close();

return (value != 0);
return !(value != 0);
}

private static void ToggleOptions(string checkboxName, bool enable)
Expand Down
2 changes: 1 addition & 1 deletion dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<Trigger Property="HasContent" Value="true">
<Setter Property="FocusVisualStyle"
Value="{StaticResource OptionMarkFocusVisual}" />
<Setter Property="Padding" Value="4,-1,0,0" />
<Setter Property="Padding" Value="4, -1, 10, 0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="checkBoxBorder"
Expand Down

0 comments on commit cd8d549

Please sign in to comment.