1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-07 17:34:06 +02:00

Change border style on Windows 8/10

This commit is contained in:
chylex 2017-04-28 19:08:10 +02:00
parent 9b314e2953
commit dca3410a5b
2 changed files with 11 additions and 0 deletions

View File

@ -105,6 +105,10 @@ public FormNotificationBase(Form owner, bool enableContextMenu){
this.browser.Dispose();
this.owner.FormClosed -= owner_FormClosed;
};
if (WindowsUtils.ShouldAvoidToolWindow){
FormBorderStyle = FormBorderStyle.FixedSingle;
}
// ReSharper disable once VirtualMemberCallInContructor
UpdateTitle();

View File

@ -8,6 +8,13 @@
namespace TweetDck.Core.Utils{
static class WindowsUtils{
public static bool ShouldAvoidToolWindow { get; }
static WindowsUtils(){
Version ver = Environment.OSVersion.Version;
ShouldAvoidToolWindow = ver.Major == 6 && ver.Minor == 2; // windows 8/10
}
public static bool CheckFolderWritePermission(string path){
string testFile = Path.Combine(path, ".test");