mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 23:34:44 +02:00
Fix inacurate ratio in Distraction Free mode
This commit is contained in:
parent
432ad06108
commit
94dffc6da8
@ -5471,10 +5471,6 @@ void Notepad_plus::distractionFreeToggle()
|
|||||||
// Enable or disable Distraction Free Mode
|
// Enable or disable Distraction Free Mode
|
||||||
if (_beforeSpecialView._isDistractionFree) // disable it
|
if (_beforeSpecialView._isDistractionFree) // disable it
|
||||||
{
|
{
|
||||||
// restore padding
|
|
||||||
paddingLeft = svp._paddingLeft;
|
|
||||||
paddingRight = svp._paddingRight;
|
|
||||||
|
|
||||||
// restore another view if 2 views mode was on
|
// restore another view if 2 views mode was on
|
||||||
if (_beforeSpecialView._was2ViewModeOn)
|
if (_beforeSpecialView._was2ViewModeOn)
|
||||||
{
|
{
|
||||||
@ -5489,15 +5485,16 @@ void Notepad_plus::distractionFreeToggle()
|
|||||||
}
|
}
|
||||||
_dockingManager.resize();
|
_dockingManager.resize();
|
||||||
|
|
||||||
|
// restore padding
|
||||||
|
paddingLeft = svp._paddingLeft;
|
||||||
|
paddingRight = svp._paddingRight;
|
||||||
|
|
||||||
// hide restore button
|
// hide restore button
|
||||||
_restoreButton.setButtonStatus(0);
|
_restoreButton.setButtonStatus(0);
|
||||||
_restoreButton.display(false);
|
_restoreButton.display(false);
|
||||||
}
|
}
|
||||||
else // enable it
|
else // enable it
|
||||||
{
|
{
|
||||||
// set padding
|
|
||||||
paddingLeft = paddingRight = svp.getDistractionFreePadding(_pEditView->getWidth());
|
|
||||||
|
|
||||||
// check if 2 views mode is on
|
// check if 2 views mode is on
|
||||||
ScintillaEditView & nonFocusedView = (otherView() == MAIN_VIEW) ? _mainEditView : _subEditView;
|
ScintillaEditView & nonFocusedView = (otherView() == MAIN_VIEW) ? _mainEditView : _subEditView;
|
||||||
if (nonFocusedView.isVisible())
|
if (nonFocusedView.isVisible())
|
||||||
@ -5527,6 +5524,9 @@ void Notepad_plus::distractionFreeToggle()
|
|||||||
}
|
}
|
||||||
_dockingManager.resize();
|
_dockingManager.resize();
|
||||||
|
|
||||||
|
// set padding
|
||||||
|
paddingLeft = paddingRight = svp.getDistractionFreePadding(_pEditView->getWidth());
|
||||||
|
|
||||||
// set state of restore button (it's already shown by fullScreen & postIt toggling)
|
// set state of restore button (it's already shown by fullScreen & postIt toggling)
|
||||||
_restoreButton.setButtonStatus(buttonStatus_distractionFree);
|
_restoreButton.setButtonStatus(buttonStatus_distractionFree);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user