-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix initial window size and remember window pos
On startup, set the window's size to a more appropriate value so as not to see the ugly scrollbars. Also, remember the window's location on exit and reapply it on startup. Author's note: This should not be merged upstream! This is just a hasty custom patch that I made that works well for my personal setup, where I use it with my custom profile switcher. I do not know whether the window size values used here only work well on my machine, or whether they would also work well for everyone. On my machine it is pixel perfect, such that the scroll bars don't appear but it is also not any larger than it needs to be. Also, for storing the window's location, it may be better to use GUISettings now (i.e the .config file), rather than what is utilized here (a .NET user.config file located in %LocalAppData%\grapher). As I say, I just put this together for my own personal benefit.
- Loading branch information
1 parent
2896b8a
commit 76d6c4b
Showing
5 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | ||
<section name="grapher.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
</startup> | ||
<userSettings> | ||
<grapher.Properties.Settings> | ||
<setting name="WindowLocation" serializeAs="String"> | ||
<value>0, 0</value> | ||
</setting> | ||
<setting name="WindowMaximized" serializeAs="String"> | ||
<value>False</value> | ||
</setting> | ||
</grapher.Properties.Settings> | ||
</userSettings> | ||
</configuration> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | ||
<Profiles> | ||
<Profile Name="(Default)" /> | ||
</Profiles> | ||
<Settings /> | ||
</SettingsFile> | ||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="grapher.Properties" GeneratedClassName="Settings"> | ||
<Profiles /> | ||
<Settings> | ||
<Setting Name="WindowLocation" Type="System.Drawing.Point" Scope="User"> | ||
<Value Profile="(Default)">0, 0</Value> | ||
</Setting> | ||
<Setting Name="WindowMaximized" Type="System.Boolean" Scope="User"> | ||
<Value Profile="(Default)">False</Value> | ||
</Setting> | ||
</Settings> | ||
</SettingsFile> |