Пример #1
0
    def _create_cross_button(self):
        # Close button
        cross_icon = get_ui_icon("cross")
        box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        close_button = Gtk.Button()
        close_button.add(box)
        box.add(cross_icon)
        close_button.get_style_context().add_class("close_button")
        close_button.connect("clicked", self.close_window)
        attach_cursor_events(close_button)

        return close_button
Пример #2
0
    def _create_cross_button(self):
        # Close button
        cross_icon = get_ui_icon('cross')
        box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
        close_button = Gtk.Button()
        close_button.add(box)
        box.add(cross_icon)
        close_button.get_style_context().add_class('close_button')
        close_button.connect('clicked', self.close_window)
        attach_cursor_events(close_button)

        return close_button
Пример #3
0
    def set_selected_style(self):
        '''We shouldn't have to worry about applying this when it
        already has been applied.
        '''

        if not self.icon_align.get_children():
            self.get_style_context().add_class("selected")
            icon = get_ui_icon("dropdown_arrow")
            self.icon_align.add(icon)
            self.show_all()

        self.icon_align.show()
Пример #4
0
    def set_selected_style(self):
        '''We shouldn't have to worry about applying this when it
        already has been applied.
        '''

        if not self.icon_align.get_children():
            self.get_style_context().add_class('selected')
            icon = get_ui_icon('dropdown_arrow')
            self.icon_align.add(icon)
            self.show_all()

        self.icon_align.show()