Set the window size.
This commit is contained in:
Родитель
08c5152ffa
Коммит
f183ac8860
|
@ -27,7 +27,6 @@ namespace GraphicsTester.Mac
|
|||
void Initialize ()
|
||||
{
|
||||
ContentViewController = new TesterViewController();
|
||||
base.SetFrame(new CGRect(0, 0, 1024, 1024), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,13 @@ namespace GraphicsTester.Mac
|
|||
View = new TesterView();
|
||||
}
|
||||
|
||||
public override void ViewDidAppear()
|
||||
{
|
||||
base.ViewDidAppear();
|
||||
var frame = View.Window.Frame;
|
||||
frame.Size = new CGSize(1024, 1024);
|
||||
View.Window.SetFrame(frame, false);
|
||||
}
|
||||
}
|
||||
|
||||
public class TesterView : NSView
|
||||
|
@ -54,8 +61,8 @@ namespace GraphicsTester.Mac
|
|||
public override void Layout()
|
||||
{
|
||||
var bounds = Bounds;
|
||||
tableView.Frame = new CGRect(0, 24, 300, bounds.Height - 24);
|
||||
graphicsView.Frame = new CGRect(300, 24, bounds.Width - 300, bounds.Height - 24);
|
||||
tableView.Frame = new CGRect(0, 0, 300, bounds.Height);
|
||||
graphicsView.Frame = new CGRect(300, 0, bounds.Width - 300, bounds.Height);
|
||||
}
|
||||
|
||||
public override CGRect Frame
|
||||
|
|
|
@ -11,6 +11,13 @@ namespace GraphicsTester.Skia {
|
|||
View = new TesterView ();
|
||||
}
|
||||
|
||||
public override void ViewDidAppear()
|
||||
{
|
||||
base.ViewDidAppear();
|
||||
var frame = View.Window.Frame;
|
||||
frame.Size = new CGSize(1024, 1024);
|
||||
View.Window.SetFrame(frame, false);
|
||||
}
|
||||
}
|
||||
|
||||
public class TesterView : NSView {
|
||||
|
@ -50,8 +57,8 @@ namespace GraphicsTester.Skia {
|
|||
public override void Layout ()
|
||||
{
|
||||
var bounds = Bounds;
|
||||
tableView.Frame = new CGRect (0, 24, 300, bounds.Height - 24);
|
||||
graphicsView.Frame = new CGRect (300, 24, bounds.Width - 300, bounds.Height - 24);
|
||||
tableView.Frame = new CGRect (0, 0, 300, bounds.Height);
|
||||
graphicsView.Frame = new CGRect (300, 0, bounds.Width - 300, bounds.Height);
|
||||
}
|
||||
|
||||
public override CGRect Frame {
|
||||
|
|
Загрузка…
Ссылка в новой задаче