Beispiel #1
0
    def add_move_event(self, widget):
        '''
        Add move event callback.

        @param widget: A widget of type gtk.Widget.
        '''
        widget.connect("button-press-event", lambda w, e: move_window(w, e, self))
Beispiel #2
0
 def __init__(self):
     super(NormalWindow, self).__init__(True)
     
     # Init Window
     self.set_position(gtk.WIN_POS_CENTER)
     self.titlebar = Titlebar(["close"])
     self.titlebar.close_button.connect_after("clicked", self.hide_window)
     self.titlebar.drag_box.connect('button-press-event', lambda w, e: move_window(w, e, self.window))
     
     main_align = gtk.Alignment()
     main_align.set(0.0, 0.0, 1.0, 1.0)
     main_align.set_padding(5, 10, 10, 10)
     self.main_box = gtk.VBox(spacing=5)
     main_align.add(self.main_box)
     self.window_frame.pack_start(self.titlebar, False, False)
     self.window_frame.pack_start(main_align, True, True)
Beispiel #3
0
 def __init__(self):
     super(NormalWindow, self).__init__(True)
     
     # Init Window
     self.set_position(gtk.WIN_POS_CENTER)
     self.titlebar = Titlebar(["close"])
     self.titlebar.close_button.connect_after("clicked", self.hide_window)
     self.titlebar.drag_box.connect('button-press-event', lambda w, e: move_window(w, e, self.window))
     
     main_align = gtk.Alignment()
     main_align.set(0.0, 0.0, 1.0, 1.0)
     main_align.set_padding(5, 10, 10, 10)
     self.main_box = gtk.VBox(spacing=5)
     main_align.add(self.main_box)
     self.window_frame.pack_start(self.titlebar, False, False)
     self.window_frame.pack_start(main_align, True, True)