Skip to content

Commit

Permalink
Full opacity for docked keyboards
Browse files Browse the repository at this point in the history
It doesn't really make sense for non-opaque docked keyboards.
By default all docked keyboards will be fully opaque.
You can still explicitly override in dynamic keyboard if you insist.
  • Loading branch information
kmcnaught committed Jun 7, 2023
1 parent d3f35bf commit 69cb83c
Showing 1 changed file with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ public void OverridePersistedState(bool inPersistNewState, string inWindowState,

public void SetOpacityOverride(string opacityString)
{
// Try to parse a string override request
if (!String.IsNullOrEmpty(opacityString))
{
if (double.TryParse(opacityString, out double opacity))
Expand All @@ -630,7 +631,16 @@ public void SetOpacityOverride(string opacityString)
return;
}
}
window.Opacity = getOpacity();
// Otherwise reset to default value
WindowStates windowState = getWindowState();
if (windowState == WindowStates.Docked)
{
window.Opacity = 1.0;
}
else
{
window.Opacity = getOpacity();
}
}

public void ResizeDockToCollapsed()
Expand Down Expand Up @@ -1016,9 +1026,16 @@ private void ApplySavedState(bool isInitialising = false)
{
Log.Info("ApplySavedState called");

var windowState = getWindowState();
window.Opacity = getOpacity();
var windowState = getWindowState();
var dockPosition = getDockPosition();
if (windowState == WindowStates.Docked)
{
window.Opacity = 1.0;
}
else
{
window.Opacity = getOpacity();
}

SetResizeState();
switch (windowState)
Expand Down

0 comments on commit 69cb83c

Please sign in to comment.