2013-06-06 2 views
0

모두모노 gtk는 최대화되지만 상단에 여전히 공간이 있습니다.

나는 monodevelop로 놀고 있는데 gtk를 사용하고 있습니다. Curently 나는 윈도우 7 x64를 사용하고있다.

내가 가지고있는 문제는 내가 왼쪽으로 페이지의 상단에 여전히 공간이 있습니다 (직접 또는 프로그램에 의해, 손으로 또는 프로그램에 의해) 창을 극대화 할 때입니다. 그리고 그것은 화면 하단에 잘 연결되지 않습니다. 따라서 전체 프로그램이 최대화 된 것처럼 보이고 몇 픽셀을 내려 놓습니다. Maximized Windows

두 번째 PRINTSCREEN에서 볼 수 있듯이, 그것은 그 위쪽에있는 프로그램을 얻을 추적 할 수없는 가망이 : small window that can reach the top

그래서 내 질문은 매우 간단 여기

는 최대화 된 창의 스크린 샷입니다 ... 내가 어떻게 정상적인 좋은 방법 최대화 창 ...

EDIT를 얻을 수 있습니다 MainWindow.cs (루트/GTK-GUI/MainWindow.cs)의 코드

// This file has been generated by the GUI designer. Do not modify. 
public partial class MainWindow 
{ 
    private global::Gtk.UIManager UIManager; 
    private global::Gtk.Action FileAction; 
    private global::Gtk.Action stopAction; 
    private global::Gtk.HPaned hpaned1; 
    private global::Gtk.VBox vbox1; 
    private global::Gtk.MenuBar menubar2; 
    private global::Gtk.HBox hbox1; 
    private global::Gtk.Button button1; 
    private global::Gtk.HPaned hpaned3; 
    private global::Gtk.ScrolledWindow GtkScrolledWindow; 
    private global::Gtk.TreeView treeview1; 
    private global::Gtk.ProgressBar progressbar1; 

    protected virtual void Build() 
    { 
     global::Stetic.Gui.Initialize (this); 
     // Widget MainWindow 
     this.UIManager = new global::Gtk.UIManager(); 
     global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); 
     this.FileAction = new global::Gtk.Action ("FileAction", global::Mono.Unix.Catalog.GetString ("File"), null, null); 
     this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("File"); 
     w1.Add (this.FileAction, null); 
     this.stopAction = new global::Gtk.Action ("stopAction", global::Mono.Unix.Catalog.GetString ("Exit"), null, "gtk-stop"); 
     this.stopAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Exit"); 
     w1.Add (this.stopAction, null); 
     this.UIManager.InsertActionGroup (w1, 0); 
     this.AddAccelGroup (this.UIManager.AccelGroup); 
     this.Name = "MainWindow"; 
     this.Title = global::Mono.Unix.Catalog.GetString ("Maximized Window"); 
     this.WindowPosition = ((global::Gtk.WindowPosition)(3)); 
     this.AllowShrink = true; 
     this.DefaultWidth = 1024; 
     this.DefaultHeight = 768; 
     // Container child MainWindow.Gtk.Container+ContainerChild 
     this.hpaned1 = new global::Gtk.HPaned(); 
     this.hpaned1.CanFocus = true; 
     this.hpaned1.Name = "hpaned1"; 
     this.hpaned1.Position = 1; 
     // Container child hpaned1.Gtk.Paned+PanedChild 
     this.vbox1 = new global::Gtk.VBox(); 
     this.vbox1.Name = "vbox1"; 
     this.vbox1.Spacing = 6; 
     // Container child vbox1.Gtk.Box+BoxChild 
     this.UIManager.AddUiFromString ("<ui><menubar name=\'menubar2\'><menu name=\'FileAction\' action=\'FileAction\'><menuite" + 
       "m name=\'stopAction\' action=\'stopAction\'/></menu></menubar></ui>"); 
     this.menubar2 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar2"))); 
     this.menubar2.Name = "menubar2"; 
     this.vbox1.Add (this.menubar2); 
     global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.menubar2])); 
     w2.Position = 0; 
     w2.Expand = false; 
     w2.Fill = false; 
     // Container child vbox1.Gtk.Box+BoxChild 
     this.hbox1 = new global::Gtk.HBox(); 
     this.hbox1.Name = "hbox1"; 
     this.hbox1.Spacing = 6; 
     // Container child hbox1.Gtk.Box+BoxChild 
     this.button1 = new global::Gtk.Button(); 
     this.button1.CanFocus = true; 
     this.button1.Name = "button1"; 
     this.button1.UseUnderline = true; 
     this.button1.Label = global::Mono.Unix.Catalog.GetString ("GtkButton"); 
     this.hbox1.Add (this.button1); 
     global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button1])); 
     w3.Position = 1; 
     w3.Expand = false; 
     w3.Fill = false; 
     this.vbox1.Add (this.hbox1); 
     global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); 
     w4.Position = 1; 
     w4.Expand = false; 
     w4.Fill = false; 
     // Container child vbox1.Gtk.Box+BoxChild 
     this.hpaned3 = new global::Gtk.HPaned(); 
     this.hpaned3.CanFocus = true; 
     this.hpaned3.Name = "hpaned3"; 
     this.hpaned3.Position = 91; 
     this.hpaned3.BorderWidth = ((uint)(2)); 
     // Container child hpaned3.Gtk.Paned+PanedChild 
     this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); 
     this.GtkScrolledWindow.Name = "GtkScrolledWindow"; 
     this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); 
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild 
     this.treeview1 = new global::Gtk.TreeView(); 
     this.treeview1.CanFocus = true; 
     this.treeview1.Name = "treeview1"; 
     this.GtkScrolledWindow.Add (this.treeview1); 
     this.hpaned3.Add (this.GtkScrolledWindow); 
     global::Gtk.Paned.PanedChild w6 = ((global::Gtk.Paned.PanedChild)(this.hpaned3 [this.GtkScrolledWindow])); 
     w6.Resize = false; 
     this.vbox1.Add (this.hpaned3); 
     global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hpaned3])); 
     w7.Position = 2; 
     // Container child vbox1.Gtk.Box+BoxChild 
     this.progressbar1 = new global::Gtk.ProgressBar(); 
     this.progressbar1.Name = "progressbar1"; 
     this.vbox1.Add (this.progressbar1); 
     global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.progressbar1])); 
     w8.Position = 3; 
     w8.Expand = false; 
     w8.Fill = false; 
     this.hpaned1.Add (this.vbox1); 
     this.Add (this.hpaned1); 
     if ((this.Child != null)) { 
      this.Child.ShowAll(); 
     } 
     this.Show(); 
     this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); 
     this.stopAction.Activated += new global::System.EventHandler (this.stopProgram); 
    } 
} 
+0

코드 게시 유용합니다! – dna

+0

@dna,'root/gtk-gui/MainWindow.cs' 코드를 추가했습니다. 이것이 당신이 의미하는 바라고 ... – Mathlight

답변

1

내 Windows 8 상자에서이 동작을 성공적으로 재현 할 수 있습니다.

WindowPositionCenterAlways으로 설정되어있는 것 같습니다. 그러나 documentation은 사용에 우리를 경고 : GTK_WIN_POS_CENTER_ALWAYS을 사용하면 거의 항상 나쁜 생각 것을

참고. 모든 윈도우 관리자 또는 모든 윈도우 시스템에서 반드시 작동하지는 않습니다.

WindowPosition에서 None (0)으로 설정하면 문제가 해결되었습니다.

+0

당신은 내 영웅입니다. 그게 바로 잘 작동 : D – Mathlight

+0

나는 다행스럽게 도와 줄 수있어 :) – dna