(self)
Update the angle of a label
Update the angle of a label
Update the angle of a label
def update_angle(self):
        """Update the angle of a label"""
        position = self.notebook.get_tab_pos()
        if position == Gtk.PositionType.LEFT:
            if hasattr(self, 'set_orientation'):
                self.set_orientation(Gtk.Orientation.VERTICAL)
            self.label.set_angle(90)
        elif position == Gtk.PositionType.RIGHT:
            if hasattr(self, 'set_orientation'):
                self.set_orientation(Gtk.Orientation.VERTICAL)
            self.label.set_angle(270)
        else:
            if hasattr(self, 'set_orientation'):
                self.set_orientation(Gtk.Orientation.HORIZONTAL)
            self.label.set_angle(0)
def update_angle ( self ) : position = self . notebook . get_tab_pos ( ) if position == Gtk . PositionType . LEFT : if hasattr ( self , 'set_orientation' ) : self . set_orientation ( Gtk . Orientation . VERTICAL ) self . label . set_angle ( 90 ) elif position == Gtk . PositionType . RIGHT : if hasattr ( self , 'set_orientation' ) : self . set_orientation ( Gtk . Orientation . VERTICAL ) self . label . set_angle ( 270 ) else : if hasattr ( self , 'set_orientation' ) : self . set_orientation ( Gtk . Orientation . HORIZONTAL ) self . label . set_angle ( 0 )