• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python app_theme.get_pixbuf函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中theme.app_theme.get_pixbuf函数的典型用法代码示例。如果您正苦于以下问题:Python get_pixbuf函数的具体用法?Python get_pixbuf怎么用?Python get_pixbuf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_pixbuf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, message, default_width=300, default_height=140, is_succeed=True):
        DialogBox.__init__(self, "", default_width, default_height, self.DIALOG_MASK_SINGLE_PAGE)

        self.hbox = gtk.HBox()
        self.image_align = gtk.Alignment()
        self.image_align.set(0, 0, 0, 0)
        self.image_align.set_padding(0, 0, 20, 0)
        self.image_box = ImageBox(app_theme.get_pixbuf("bluetooth/succeed.png"))
        if not is_succeed:
            self.image_box = ImageBox(app_theme.get_pixbuf("bluetooth/failed.png"))
        self.image_align.add(self.image_box)
        self.message_align = gtk.Alignment()
        self.message_align.set(0, 0, 0, 0)
        self.message_align.set_padding(20, 0, 10, 0)
        if not is_succeed:
            self.message_align.set_padding(0, 0, 10, 0)
        self.message_label = Label(message, wrap_width = 200)
        self.message_align.add(self.message_label)
        self.hbox.pack_start(self.image_align)
        self.hbox.pack_start(self.message_align)
        self.confirm_align = gtk.Alignment()
        self.confirm_align.set(0, 0, 0, 0)
        self.confirm_align.set_padding(20, 0, 200, 0)
        self.confirm_button = Button(_("Ok"))
        self.confirm_button.set_size_request(70, WIDGET_HEIGHT)
        self.confirm_button.connect("clicked", lambda widget : self.destroy())
        self.confirm_align.add(self.confirm_button)

        self.body_box.pack_start(self.hbox, False, False)
        self.body_box.pack_start(self.confirm_align, False, False)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:30,代码来源:bluetooth_dialog.py


示例2: __init__

    def __init__(self, display_manager):
        ResizableBox.__init__(self, resizable = False)

        self.__display_manager = display_manager

        self.select_output_name = None

        self.output_width = 220
        self.output_height = 120
        self.output_padding = 3
        self.output_small_size = 20
        self.line_width = 1.0
        self.text_size = 10

        self.primary_pixbuf = app_theme.get_pixbuf("display/n01.png")
        self.other_pixbuf = app_theme.get_pixbuf("display/n00.png")

        self.__eventx = 0
        self.__eventy = 0

        output_names = self.__display_manager.get_connect_output_names()
        self.output_infos = []
        for name in output_names:
            info = {}
            info['name'] = name
            info['is_primary'] = name == self.__display_manager.get_primary_output_name()
            info['output_x'] = None
            info['output_width'] = None
            self.output_infos.append(info)

        self.connect("button-press-event", self.__button_press)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:31,代码来源:display_view.py


示例3: __init__

    def __init__(self, account_setting):
        gtk.VBox.__init__(self)
        self.account_setting = account_setting
        
        self.camera_pixbuf = app_theme.get_pixbuf("account/camera.png").get_pixbuf()
        self.error_pixbuf = app_theme.get_pixbuf("account/error.png").get_pixbuf()
        self.success_pixbuf = app_theme.get_pixbuf("account/success.png").get_pixbuf()

        self.camera_box_align = gtk.Alignment(0.5, 0, 0, 0)
        self.camera_box = gtk.VBox()
        self.camera_box.set_size_request(CAMERA_BOX_SIZE, CAMERA_BOX_SIZE)
        self.camera_box.connect("expose-event", self.__camera_box_expose)
        self.camera_box_align.add(self.camera_box)

        self.under_camera_box = gtk.VBox(spacing=10)
        self.under_camera_box_align = gtk.Alignment(0.5, 0, 0, 0)
        self.under_camera_box_align.set_padding(WIDGET_SPACING, 0, 0, 0)
        self.under_camera_box_align.add(self.under_camera_box)
        self.__init_widgets()
        if Webcam.has_device():
            self.under_camera_box.pack_start(self.start_record_button)
        else:
            self.under_camera_box.pack_start(self.no_device_warning)

        self.pack_start(self.camera_box_align, False, False)
        self.pack_start(self.under_camera_box_align, False, False)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:26,代码来源:face_record_page.py


示例4: __init__

    def __init__(self, module_path):
        '''
        init docs
        '''
        self.path = module_path
        self.config = Config(os.path.join(self.path, "config.ini"))
        self.config.load()
        self.id = self.config.get("main", "id")
        # TODO: lihongwu req to support i18n
        self.name = MODULES_NAME_FOR_L18N.get(self.id, "")
        self.default_name = self.config.get("name", "default")

        """
        self.name = self.default_name
        if MAIN_LANG != "en_US":
            self.name = self.config.get("name", MAIN_LANG)
        """

        icon_infos = [self.get_system_icon_info(self.id, 48), 
                      self.get_system_icon_info(self.id, 16),
                     ]
        
        self.icon_pixbuf = None
        self.menu_icon_pixbuf = None
        try:
            self.icon_pixbuf = gtk.gdk.pixbuf_new_from_file(icon_infos[0])
            self.menu_icon_pixbuf = gtk.gdk.pixbuf_new_from_file(icon_infos[1])
        except:
            self.icon_pixbuf = app_theme.get_pixbuf("navigate/none-big.png").get_pixbuf()
            self.menu_icon_pixbuf = app_theme.get_pixbuf("navigate/none-small.png").get_pixbuf()
            
        self.search_keyword = self.config.get("main", "search_keyword")
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:32,代码来源:module_info.py


示例5: __init__

    def __init__(self, path, theme):
        '''
        Initialize ItemIcon class.
        
        @param pixbuf: Icon pixbuf.
        '''
        gobject.GObject.__init__(self)

        self.image_path = path
        self.theme = theme
        self.pixbuf = None
        self.hover_flag = False
        self.highlight_flag = False
        self.wallpaper_width = SMALL_SIZE["x"]
        self.wallpaper_height = SMALL_SIZE["y"]
        self.width = self.wallpaper_width + ITEM_PADDING_X * 2
        self.height = self.wallpaper_height + ITEM_PADDING_Y * 2
        
        self.is_hover = False
        self.hover_stroke_dcolor = app_theme.get_color("globalHoverStroke")
        self.hover_response_rect = gtk.gdk.Rectangle(
            ITEM_PADDING_X, ITEM_PADDING_Y ,
            self.wallpaper_width, self.wallpaper_height
            ) 

        self.cross_normal_dpixbuf = app_theme.get_pixbuf("individuation/cross_normal.png")
        self.cross_gray_dpixbuf = app_theme.get_pixbuf("individuation/cross_gray.png")
        
        self.is_tick = False
        self.tick_area = None
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:30,代码来源:wallpaper_item.py


示例6: __init__

    def __init__(self, pixbuf=None, image_path='', padding_x=4, padding_y=4, has_frame=True, can_del=False):
        super(IconButton, self).__init__()
        self.connect("expose-event", self.__expose_cb)
        self.padding_x = padding_x
        self.padding_y = padding_y
        self.image_path = image_path
        self.has_frame = has_frame
        self.can_del = can_del

        self.add_events(gtk.gdk.ENTER_NOTIFY_MASK)
        self.add_events(gtk.gdk.LEAVE_NOTIFY_MASK)
        self.add_events(gtk.gdk.BUTTON_PRESS_MASK)
        self.add_events(gtk.gdk.BUTTON_RELEASE_MASK)

        self.connect("enter-notify-event", lambda w,e: self.set_state(gtk.STATE_PRELIGHT))
        self.connect("leave-notify-event", lambda w,e: self.set_state(gtk.STATE_NORMAL))
        self.connect("button-press-event", self.__on_button_press_cb)

        self.del_bg_pixbuf = app_theme.get_pixbuf("account/X_bg.png")
        self.del_fg_pixbuf = app_theme.get_pixbuf("account/X_fg.png")
        self.bg_offset_x = 0
        self.bg_offset_y = 0
        self.bg_width = 0
        self.bg_height = 0
        self.set_from_pixbuf(pixbuf)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:25,代码来源:icon_button.py


示例7: __init__

    def __init__(self,
                 name,
                 ap_list,
                 setting_page,
                 slide_to_setting_page_cb,
                 send_to_crumb,
                 check_state=2,
                 font_size=DEFAULT_FONT_SIZE):

        TreeItem.__init__(self)

        self.name = name
        self.ap_list = ap_list
        self.setting = setting_page
        self.slide_to_setting = slide_to_setting_page_cb
        self.send_to_crumb = send_to_crumb
        self.font_size = font_size
        self.check_width = self.get_check_width()
        self.essid_width = self.get_essid_width(self.name)
        self.jumpto_width = self.get_jumpto_width()
        self.network_state = check_state

        self.is_last = True
        self.position = 0

        '''
        Pixbufs
        '''
        self.border_color = border_normal_color
        self.bg_color = bg_normal_color
        self.loading_pixbuf = app_theme.get_pixbuf("network/loading.png")
        self.check_pixbuf = app_theme.get_pixbuf("network/check_box-2.png")
        self.jumpto_pixbuf = app_theme.get_pixbuf("network/jump_to.png")
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:33,代码来源:lists.py


示例8: create_color_button

 def create_color_button(self, box, name):
     '''
     create color button
     @param box: a gtk.HBox
     @param name: the button's name
     '''
     button = ImageButton(
         app_theme.get_pixbuf("color/" + name + ".png"),
         app_theme.get_pixbuf("color/" + name + "_hover.png"),
         app_theme.get_pixbuf("color/" + name + "_hover.png"))
     button.connect('pressed', lambda w:self._color_button_pressed(name))
     box.pack_start(button)
开发者ID:ChanningBJ,项目名称:deepin-screenshot,代码行数:12,代码来源:toolbar.py


示例9: __make_playback_box

 def __make_playback_box(self, stream, index):
     process_id = int(stream['proplist']['application.process.id'])
     if process_id == os.getpid():
         return
     # if it has show mpris, then don't show sink_input
     if process_id in self.mpris_list:
         self.mpris_stream[process_id] = index
         self.stream_mpris[index] = process_id
         return
     icon_name, is_filtered = self.__white_list_check(stream, index)
     if is_filtered:
         return
     self.stream_list[index] = {}
     volume_max_percent = pypulse.MAX_VOLUME_VALUE * 100 / pypulse.NORMAL_VOLUME_VALUE
     if icon_name:
         if icon_name[0] == '/':
             try:
                 img = gtk.image_new_from_pixbuf(gtk.gdk.pixbuf_new_from_file(
                     icon_name).scale_simple(16, 16, gtk.gdk.INTERP_TILES))
             except:
                 img = gtk.image_new_from_pixbuf(self.stream_icon)
         else:
             image_pixbuf = self.__get_pixbuf_from_icon_name(icon_name)
             if image_pixbuf:
                 img = gtk.image_new_from_pixbuf(image_pixbuf)
             else:
                 img = gtk.image_new_from_pixbuf(self.stream_icon)
                 #img = gtk.image_new_from_icon_name(icon_name, gtk.ICON_SIZE_MENU)
     else:
         img = gtk.image_new_from_pixbuf(self.stream_icon)
     img.set_size_request(16, 16)
     scale = HScalebar(show_value=False, format_value="%", value_min=0, value_max=volume_max_percent)
     scale.set_magnetic_values([(0, 5), (100, 5), (volume_max_percent, 5)])
     scale.set_size_request(90, 10)
     mute_button = SwitchButton(
         inactive_disable_dpixbuf=app_theme.get_pixbuf("toggle_button/inactive_normal.png"), 
         active_disable_dpixbuf=app_theme.get_pixbuf("toggle_button/inactive_normal.png"))
     hbox = gtk.HBox()
     hbox.pack_start(self.__make_align(img), False, False)
     hbox.pack_start(self.__make_align(scale, yalign=0.0, yscale=1.0, padding_left=5, padding_right=5, height=25), False, False)
     hbox.pack_start(self.__make_align(mute_button), False, False)
     self.stream_list[index]['scale'] = scale
     self.stream_list[index]['button'] = mute_button
     self.stream_list[index]['container'] = hbox
     self.stream_list[index]['process_id'] = process_id
     self.stream_list[index]['stream_id'] = index
     self.stream_process[process_id] = self.stream_list[index]
     self.__set_playback_status(stream, scale, mute_button)
     if stream['volume_writable']:
         scale.connect("value-changed", self.playback_stream_scale_changed_cb, index, mute_button)
         mute_button.connect("toggled", self.playback_stream_toggled_cb, index, scale)
     hbox.show_all()
     self.__app_vbox.pack_start(hbox, False, False)
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:53,代码来源:tray_sound_gui_small.py


示例10: __draw_mpris_button_cb

 def __draw_mpris_button_cb(self, bt, event):
     if bt.get_state() == gtk.STATE_PRELIGHT:
         pixbuf = app_theme.get_pixbuf("sound/%s_hover.png" % bt.pixbuf).get_pixbuf()
     elif bt.get_state() == gtk.STATE_ACTIVE:
         pixbuf = app_theme.get_pixbuf("sound/%s_press.png" % bt.pixbuf).get_pixbuf()
     else:
         pixbuf = app_theme.get_pixbuf("sound/%s_normal.png" % bt.pixbuf).get_pixbuf()
     cr = bt.window.cairo_create()
     pix_height = pixbuf.get_height()
     cr.set_source_pixbuf(pixbuf, bt.allocation.x, bt.allocation.y + (bt.allocation.height - pix_height) / 2)
     cr.paint()
     return True
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:12,代码来源:tray_sound_gui_small.py


示例11: create_toggle_button

 def create_toggle_button(self, name):
     '''
     create a togglebutton
     @param name: the button's name
     @return: a dtk.ui.ToggleButton
     '''
     button = ToggleButton(
         app_theme.get_pixbuf("size/" + name + ".png"),
         app_theme.get_pixbuf("size/" + name + "_press.png"),
         app_theme.get_pixbuf("size/" + name + "_hover.png"),
         app_theme.get_pixbuf("size/" + name + "_press.png"))
     button.set_name(name)
     return button
开发者ID:ChanningBJ,项目名称:deepin-screenshot,代码行数:13,代码来源:toolbar.py


示例12: __init__

    def __init__(self):
        gobject.GObject.__init__(self)
        
        self.progress = 0

        self.percentage_dpixbuf = [app_theme.get_pixbuf("power/10.png"), 
                                   app_theme.get_pixbuf("power/20.png"), 
                                   app_theme.get_pixbuf("power/30.png"), 
                                   app_theme.get_pixbuf("power/40.png"), 
                                   app_theme.get_pixbuf("power/50.png"), 
                                   app_theme.get_pixbuf("power/60.png"), 
                                   app_theme.get_pixbuf("power/70.png"), 
                                   app_theme.get_pixbuf("power/80.png"), 
                                   app_theme.get_pixbuf("power/90.png"), 
                                   app_theme.get_pixbuf("power/100.png")]
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:15,代码来源:power_progressbar.py


示例13: friendships_add_thread

 def friendships_add_thread(self, button, weibo, box):
     '''add friendships'''
     if weibo.friendships_create() is not None:
         gtk.gdk.threads_enter()
         button.destroy()
         if not default_locale.startswith("zh_"):
             button = gtk.image_new_from_pixbuf(
                 app_theme.get_pixbuf("share/followed_en.png").get_pixbuf())
         else:
             button = gtk.image_new_from_pixbuf(
                 app_theme.get_pixbuf("share/followed.png").get_pixbuf())
         button.show()
         box.pack_start(button, False, False)
         #button.set_label("已关注")
         gtk.gdk.threads_leave()
开发者ID:jaycococ,项目名称:deepin-screenshot,代码行数:15,代码来源:share.py


示例14: __create_widget

    def __create_widget(self):
        # label widget
        self.label_widgets["copyright"] = Label("%s%s" % ("Copyright © 2011 - %s " % datetime.today().year, 
                                                          _("Wuhan Deepin Technology Co.Ltd, All rights reserved")), 
                                                enable_select=False, enable_double_click=False)
        self.label_widgets["version"] = Label(_("Version"), enable_select=False, enable_double_click=False)
        self.label_widgets["cpu"] = Label(_("CPU"), enable_select=False, enable_double_click=False)
        self.label_widgets["mem"] = Label(_("Memory"), enable_select=False, enable_double_click=False)
        self.label_widgets["arch"] = Label(_("OS Type"), enable_select=False, enable_double_click=False)
        self.label_widgets["disk"] = Label(_("Disk"), enable_select=False, enable_double_click=False)
        self.label_widgets["version_info"] = Label("", enable_select=False, enable_double_click=False)
        self.label_widgets["cpu_info"] = Label("", enable_select=False, enable_double_click=False)
        self.label_widgets["mem_info"] = Label("", enable_select=False, enable_double_click=False)
        self.label_widgets["arch_info"] = Label("", enable_select=False, enable_double_click=False)
        self.label_widgets["disk_info"] = Label("", enable_select=False, enable_double_click=False)

        # image widget
        self.image_widgets["logo"] = ImageBox(app_theme.get_pixbuf('%s/logo.png' % MODULE_NAME))
        
        # container widget
        self.container_widgets["main_hbox"] = gtk.HBox(False)
        self.container_widgets["left_vbox"] = gtk.VBox(False)
        self.container_widgets["right_vbox"] = gtk.VBox(False)
        self.container_widgets["info_vbox"] = gtk.VBox(False)
        self.container_widgets["info_table"] = gtk.Table(5, 2)

        # alignment widget
        self.alignment_widgets["main_hbox"] = gtk.Alignment()
        self.alignment_widgets["logo"] = gtk.Alignment()
        self.alignment_widgets["right_vbox"] = gtk.Alignment()
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:30,代码来源:main.py


示例15: __init__

    def __init__(self, network_interface):
        gtk.VBox.__init__(self)

        self.theme = None

        self.set_spacing(10)

        self.cache_view = CacheView(network_interface, download_dir=get_download_wallpaper_dir())
        self.cache_view_sw = self.cache_view.get_scrolled_window()

        self.nolink_image = ImageBox(app_theme.get_pixbuf("individuation/notlink.png"))

        self.back_button = Button(_("Back"))
        self.back_button.connect("clicked", self.__on_back)
        download_button = Button(_("Download All"))
        download_button.connect("clicked", self.on_download_button_clicked)

        control_box = gtk.HBox(spacing=10)
        control_box.pack_start(self.back_button, False, False)

        self.control_align = gtk.Alignment()
        self.control_align.set(1.0, 0.5, 0, 0)
        self.control_align.set_padding(0, 5, 0, 10)
        self.control_align.add(control_box)

        self.pack_start(self.cache_view_sw, True, True)
        self.pack_start(self.control_align, False, True)

        event_manager.add_callback("fetch-failed", self.__fetch_failed)
开发者ID:martyr-deepin,项目名称:deepin-system-settings,代码行数:29,代码来源:cache_page.py


示例16: create_button

 def create_button(self, name, text=''):
     '''
     make a button
     @param name: the button's name, a string
     @param text: the button's tooltip text, a string
     '''
     button = ImageButton(
         app_theme.get_pixbuf("action/" + name + "_normal.png"),
         app_theme.get_pixbuf("action/" + name + "_hover.png"),
         app_theme.get_pixbuf("action/" + name + "_press.png"))
     button.connect("enter-notify-event", self._show_tooltip, text)
     button.connect("clicked", self._button_clicked, name)
     button.set_name(name)
     #button.set_size_request(28, 28)
     self.toolbox.pack_start(button)
     return button
开发者ID:BZZYTGTD,项目名称:deepin-screenshot,代码行数:16,代码来源:toolbar.py


示例17: _color_button_pressed

 def _color_button_pressed(self, name):
     ''' color button pressed callback'''
     pix = app_theme.get_pixbuf("color_big/" + name + ".png").get_pixbuf()
     self.color_select.set_from_pixbuf(pix)
     if self.screenshot is None:
         return
     self.screenshot.action_color = self.color_map[name]
     if self.screenshot.show_text_window_flag:
         self.screenshot.text_window.set_text_color(self.screenshot.action_color)
         self.win.refresh()
开发者ID:ChanningBJ,项目名称:deepin-screenshot,代码行数:10,代码来源:toolbar.py


示例18: _list_menu_show

 def _list_menu_show(self, button, x, y, offset_x, offset_y):
     '''the combo button clicked callback. show combo_buton list menu'''
     menu_item = [
         (None, _("Save automatically"), self._list_menu_click, SAVE_OP_AUTO, button),
         (None, _("Save as"), self._list_menu_click, SAVE_OP_AS, button),
         (None, _("Save to clipboard"), self._list_menu_click, SAVE_OP_CLIP, button),
         (None, _("Save automatically to file and clipboard"), self._list_menu_click, SAVE_OP_AUTO_AND_CLIP, button)]
     # set current operate icon
     current_item = menu_item[self.screenshot.save_op_index] 
     menu_pixbuf = (
         app_theme.get_pixbuf("action/selected.png"),
         app_theme.get_pixbuf("action/selected_hover.png"),
         app_theme.get_pixbuf("action/selected.png"))
     menu_item[self.screenshot.save_op_index] = (menu_pixbuf, 
         current_item[1], current_item[2], current_item[3])
     self.combo_menu = Menu(menu_item, is_root_menu=True, 
         menu_item_select_color=app_theme.get_shadow_color("menu_item_select").get_color_info())
     self.set_all_inactive()
     self.combo_menu.show((x, y), (offset_x, offset_y))
开发者ID:ChanningBJ,项目名称:deepin-screenshot,代码行数:19,代码来源:toolbar.py


示例19: plugin_widget

    def plugin_widget(self):
        self.__get_devices()
        plugin_box = gtk.VBox()
        adapter_box = gtk.HBox(spacing = 5)
        adapter_image = ImageBox(app_theme.get_pixbuf("bluetooth/enable_open.png"))
        adapter_label = self.__setup_label(_("Adapter"))
        adapter_toggle = self.__setup_toggle()
        if self.my_bluetooth.adapter:
            adapter_toggle.set_active(self.my_bluetooth.adapter.get_powered())
            if self.my_bluetooth.adapter.get_powered():
                self.tray_icon.set_icon_theme("enable")
            else:
                self.tray_icon.set_icon_theme("enable_disconnect")
        adapter_toggle.connect("toggled", self.__adapter_toggled)
        separator_align = self.__setup_align(padding_bottom = 0)
        separator = self.__setup_separator()
        separator_align.add(separator)
        '''
        devices treeview
        '''
        device_treeview = TreeView()
        device_separator_align = self.__setup_align()
        device_separator = self.__setup_separator()
        device_separator_align.add(device_separator)
        device_count = len(self.device_items)
        if device_count:
            device_treeview.delete_all_items()
            device_treeview.add_items(self.device_items)
            device_treeview.set_size_request(self.width, device_count * DeviceItem.ITEM_HEIGHT)
        else:
            device_treeview.set_child_visible(False)
            device_separator_align.set_size_request(-1, 0)
            device_separator_align.set_child_visible(False)
        '''
        select button
        '''
        select_button_align = self.__setup_align()
        select_button = SelectButton(_("Advanced options..."),
                                     font_size = 10,
                                     ali_padding = 5)
        select_button.set_size_request(self.width, 25)
        select_button.connect("clicked", self.__bluetooth_selected) # I don't know why, but replacing "button-press-event" with 
        select_button_align.add(select_button)                      # clicked really works...

        adapter_box.pack_start(adapter_image, False, False)
        adapter_box.pack_start(adapter_label, False, False)
        adapter_box.pack_start(adapter_toggle, False, False)

        plugin_box.pack_start(adapter_box, False, False)
        plugin_box.pack_start(separator_align, False, False)
        plugin_box.pack_start(device_treeview, False, False)
        plugin_box.pack_start(device_separator_align, False, False)
        plugin_box.pack_start(select_button_align, False, False)

        return plugin_box
开发者ID:electricface,项目名称:deepin-system-settings,代码行数:55,代码来源:tray_bluetooth_plugin.py


示例20: create_toggle_button

 def create_toggle_button(self, name, action, index, text=''):
     '''
     create a togglebutton
     @param name: the button's name, a string
     @param action: one of ACTION Type Constants 
     @param index: the button's index in button list, an int num
     @param text: the button's tooltip text, a string
     '''
     button = ToggleButtonItem(
         (app_theme.get_pixbuf("action/" + name + "_normal.png"),
         app_theme.get_pixbuf("action/" + name + "_press.png"),
         app_theme.get_pixbuf("action/" + name + "_hover.png"),
         app_theme.get_pixbuf("action/" + name + "_press.png"), None),
         index, self._toggle_button_group.set_index, self._toggle_button_group.get_index)
     button.connect("pressed", self._toggle_button_pressed)
     button.connect("toggled", self._toggle_button_toggled, action)
     button.connect("enter-notify-event", self._show_tooltip, text)
     button.set_name(name)
     #self.toolbox.pack_start(button)
     self._toggle_button_group.pack_start(button)
     self._toggle_button_list.append(button)
开发者ID:BZZYTGTD,项目名称:deepin-screenshot,代码行数:21,代码来源:toolbar.py



注:本文中的theme.app_theme.get_pixbuf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python shortcuts.render_to_response函数代码示例发布时间:2022-05-27
下一篇:
Python theme.Theme类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap