[log] open slightly off center for each consecutive window
This commit is contained in:
parent
6ce9679409
commit
634a9a8b9d
|
@ -33,6 +33,7 @@ namespace SparkleShare {
|
||||||
private WebView WebView;
|
private WebView WebView;
|
||||||
private NSButton CloseButton;
|
private NSButton CloseButton;
|
||||||
private NSButton OpenFolderButton;
|
private NSButton OpenFolderButton;
|
||||||
|
private NSBox Separator;
|
||||||
|
|
||||||
public SparkleLog (IntPtr handle) : base (handle) { }
|
public SparkleLog (IntPtr handle) : base (handle) { }
|
||||||
|
|
||||||
|
@ -44,9 +45,18 @@ namespace SparkleShare {
|
||||||
Delegate = new LogDelegate ();
|
Delegate = new LogDelegate ();
|
||||||
|
|
||||||
SetFrame (new RectangleF (0, 0, 480, 640), true);
|
SetFrame (new RectangleF (0, 0, 480, 640), true);
|
||||||
|
|
||||||
Center ();
|
Center ();
|
||||||
|
|
||||||
|
// Open slightly off center for each consecutive window
|
||||||
|
if (SparkleUI.OpenLogs.Count > 0) {
|
||||||
|
|
||||||
|
RectangleF offset = new RectangleF (Frame.X + (SparkleUI.OpenLogs.Count * 20),
|
||||||
|
Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);
|
||||||
|
|
||||||
|
SetFrame (offset, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
StyleMask = (NSWindowStyle.Closable |
|
StyleMask = (NSWindowStyle.Closable |
|
||||||
NSWindowStyle.Miniaturizable |
|
NSWindowStyle.Miniaturizable |
|
||||||
NSWindowStyle.Titled);
|
NSWindowStyle.Titled);
|
||||||
|
@ -90,12 +100,12 @@ namespace SparkleShare {
|
||||||
string name = Path.GetFileName (LocalPath);
|
string name = Path.GetFileName (LocalPath);
|
||||||
Title = String.Format ("Recent Events in ‘{0}’", name);
|
Title = String.Format ("Recent Events in ‘{0}’", name);
|
||||||
|
|
||||||
NSBox box = new NSBox (new RectangleF (0, 58, 480, 1)) {
|
Separator = new NSBox (new RectangleF (0, 58, 480, 1)) {
|
||||||
BorderColor = NSColor.LightGray,
|
BorderColor = NSColor.LightGray,
|
||||||
BoxType = NSBoxType.NSBoxCustom
|
BoxType = NSBoxType.NSBoxCustom
|
||||||
};
|
};
|
||||||
|
|
||||||
ContentView.AddSubview (box);
|
ContentView.AddSubview (Separator);
|
||||||
|
|
||||||
OrderFrontRegardless ();
|
OrderFrontRegardless ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue