-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a menu option to hide the tool window panel
This allows the panel to be completely hidden (which takes up less space than minimizing the tool windows). The menu options for minimizing the individual panels were also unnecessary since the minimizing can be done through the UI widgets Fixes: #1179
- Loading branch information
1 parent
7e4bf3d
commit 88567f7
Showing
9 changed files
with
60 additions
and
49 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Pinta.Core; | ||
|
||
namespace Pinta.Actions; | ||
|
||
internal sealed class ToolWindowsToggledAction : IActionHandler | ||
{ | ||
private readonly ViewActions view; | ||
private readonly ChromeManager chrome; | ||
internal ToolWindowsToggledAction ( | ||
ViewActions view, | ||
ChromeManager chrome) | ||
{ | ||
this.view = view; | ||
this.chrome = chrome; | ||
} | ||
|
||
void IActionHandler.Initialize () | ||
{ | ||
view.ToolWindows.Toggled += Activated; | ||
} | ||
|
||
void IActionHandler.Uninitialize () | ||
{ | ||
view.ToolWindows.Toggled -= Activated; | ||
} | ||
|
||
private void Activated (bool value) | ||
{ | ||
var dock = (Docking.Dock) chrome.Dock; | ||
dock.RightPanel.Visible = value; | ||
|
||
System.Console.WriteLine ($"visible {value}"); | ||
} | ||
} |
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
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
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