mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-21 04:43:55 +12:00
Fixed chrome resetting when exiting fullscreen mode.
This commit is contained in:
parent
7cba536877
commit
a0b571206b
|
@ -280,6 +280,7 @@ namespace OnTopReplica {
|
|||
bool _isFullscreen = false;
|
||||
Point _preFullscreenLocation;
|
||||
Size _preFullscreenSize;
|
||||
FormBorderStyle _preFullscreenBorderStyle;
|
||||
|
||||
public bool IsFullscreen {
|
||||
get {
|
||||
|
@ -297,6 +298,7 @@ namespace OnTopReplica {
|
|||
if (value) {
|
||||
_preFullscreenLocation = Location;
|
||||
_preFullscreenSize = ClientSize;
|
||||
_preFullscreenBorderStyle = FormBorderStyle;
|
||||
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
var currentScreen = Screen.FromControl(this);
|
||||
|
@ -304,7 +306,7 @@ namespace OnTopReplica {
|
|||
Location = currentScreen.WorkingArea.Location;
|
||||
}
|
||||
else {
|
||||
FormBorderStyle = DefaultBorderStyle;
|
||||
FormBorderStyle = _preFullscreenBorderStyle;
|
||||
Location = _preFullscreenLocation;
|
||||
ClientSize = _preFullscreenSize;
|
||||
RefreshAspectRatio();
|
||||
|
|
Loading…
Reference in a new issue