當前位置: 首頁>>代碼示例>>Python>>正文


Python Application.set_default_size方法代碼示例

本文整理匯總了Python中dtk.ui.application.Application.set_default_size方法的典型用法代碼示例。如果您正苦於以下問題:Python Application.set_default_size方法的具體用法?Python Application.set_default_size怎麽用?Python Application.set_default_size使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dtk.ui.application.Application的用法示例。


在下文中一共展示了Application.set_default_size方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: GUI

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class GUI(object):
    '''Media Player GUI kernel code.核心界麵代碼'''
    def __init__(self):        
        '''application.'''
        self.app = Application(False)
        # application set.
        self.app.set_default_size(800, 500)
        # self.app.window.resize
        self.app.set_icon(app_theme.get_pixbuf("icon.ico"))
        self.app.set_skin_preview(app_theme.get_pixbuf("frame.png"))
        # set titlebar.
        self.app.add_titlebar(["theme", "menu", "max", "min", "close"],
                              app_theme.get_pixbuf("logo.png"),
                              _("Deepin Media Player"), " ", 
                              add_separator = False)
        #
        self.main_ali = gtk.Alignment()
        self.main_vbox = gtk.VBox()
        self.main_ali.add(self.main_vbox)
        self.main_ali.set(0, 0, 1.0, 1.0)
        self.main_ali.set_padding(0, 2, 2, 2)
        '''movie screen. 電影播放屏幕.'''
        # 播放屏幕和播放列表的HBOX.
        self.screen_and_play_list_hbox = gtk.HBox() 
        self.screen_frame = gtk.Alignment(0.0, 0.0, 1.0, 1.0)
        self.screen = gtk.DrawingArea()
        self.screen_frame.add(self.screen)
        #
        self.play_list = gtk.Button("播放列表")
        #
        self.screen_and_play_list_hbox.pack_start(self.screen_frame, True, True)
        self.screen_and_play_list_hbox.pack_start(self.play_list, False, False)
        #
        self.main_vbox.pack_start(self.screen_and_play_list_hbox, True, True)
        #
        self.app.main_box.pack_start(self.main_ali, True, True)
        
    def show_play_list(self):    
        self.screen_and_play_list_hbox.pack_start(self.play_list, False, False)
        
    def hide_play_list(self):    
        self.screen_and_play_list_hbox.remove(self.play_list)        
開發者ID:hailongqiu,項目名稱:movie_down,代碼行數:44,代碼來源:gui.py

示例2: Application

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
    "01",
    os.path.join(get_parent_dir(__file__), "skin"),
    os.path.join(get_parent_dir(__file__), "app_theme"),
    )

from dtk.ui.application import Application
from dtk.ui.dragable_tab import TabBox
from dtk.ui.constant import DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT
import gtk

if __name__ == "__main__":
    # Init application.
    application = Application()

    # Set application default size.
    application.set_default_size(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)

    # Set application icon.
    application.set_icon(os.path.join(get_current_dir(__file__), "icon.ico"))
    
    # Set application preview pixbuf.
    application.set_skin_preview(os.path.join(get_current_dir(__file__), "frame.png"))
    
    # Add titlebar.
    application.add_titlebar(
        ["theme", "max", "min", "close"], 
        os.path.join(get_current_dir(__file__), "logo.png"), 
        "Tab demo",
        "Tab demo",
        )
    
開發者ID:Jiarui315,項目名稱:deepin-ui,代碼行數:32,代碼來源:tab_demo.py

示例3: init_theme

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from dtk.ui.init_skin import init_theme
init_theme()
from dtk.ui.application import Application
from dtk.ui.button import ToggleButton
from dtk.ui.theme import ui_theme
from dtk.ui.dialog import ConfirmDialog
import gtk

if __name__ == "__main__":
    application = Application()
    application.set_default_size(600, 450)
    application.add_titlebar(title="ToggleButton example!")
    
    toggle_button = ToggleButton(
        inactive_normal_dpixbuf=ui_theme.get_pixbuf("switchbutton/off.png"),
        active_normal_dpixbuf=ui_theme.get_pixbuf("switchbutton/on.png"),
        button_label="This is toggle button",
        padding_x=5,
        )
    toggle_button.connect(
        "toggled", 
        lambda w: ConfirmDialog(
            "反饋對話框",
            "按鈕開啟" if w.get_active() else "按鈕關閉",
            ).show_all())
    
    toggle_button_align = gtk.Alignment()
    toggle_button_align.set(0.5, 0.5, 0, 0)
開發者ID:Biobeyoung,項目名稱:linuxdeepin-application-development-manual,代碼行數:33,代碼來源:toggle_button.py

示例4: AssemblyIDE

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class AssemblyIDE(object):
    def __init__ (self):            
        self.app = Application()
        # Set app size.
        self.app.set_default_size(APP_WIDTH, APP_HEIGHT)
        self.app.set_icon(app_theme.get_pixbuf("logo.ico"))
        self.app.set_skin_preview(app_theme.get_pixbuf("frame.png"))        
        # Add app titlebar.
        self.app.add_titlebar(["theme", "max", "min", "close"],
                              app_theme.get_pixbuf("logo.png"),
                              "Assembly-IDE v 1.0", " ", add_separator = True)

        self.vbox_ali = gtk.Alignment()
        self.vbox_ali.set(1, 1, 1, 1)
        self.vbox_ali.set_padding(6, 2, 2, 2)
        self.vbox = gtk.VBox()
        self.vbox_ali.add(self.vbox)
        
        self.init_root_menu()
        
        self.init_top_toolbar()
        
        self.code_edit = CodeEdit()
        self.code_edit_file = self.code_edit.file_path
        
        self.complie_show_list = ComplieShowList()
        self.code_edit.connect("codeedit-changed-file-name", self.modify_code_edit_file_name)
        
        self.vbox.pack_start(self.top_toolbar_ali, False, False)
        self.vbox.pack_start(self.code_edit, True,True)
        self.vbox.pack_start(self.complie_show_list, False, False)
        self.app.main_box.pack_start(self.vbox_ali, True, True)
        self.app.window.show_all()
        
    def init_root_menu(self):        
        # Init file menu.
        file_menu = Menu(
            [(None, "新建", lambda : self.code_edit.clear()), # 清空代碼編輯器.
             (None, "打開", lambda : self.open_file_dialog_window()),
             (None),
             (None, "我的程序...", None),
             (None),
             (None, "保存", lambda : self.code_edit.save()),
             (None, "另存為", None),
             (None),
             (None, "退出", lambda :gtk.main_quit())
             ]
            )
        # Init edit menu.
        edit_menu = Menu(
            [(None, "剪切", None),
             (None, "複製", None),             
             (None, "粘帖", None),
             (None, "全選", None),
             (None),
             (None, "注釋", lambda : self.notes_line()),
             (None, "取消注釋", lambda : self.notes_line()),
             (None),
             (None, "撤銷", None),
             (None, "恢複", None),
             (None),
             (None, "查找", None),
             (None, "替換", None),
             (None, "定位到行", None)
             ]
            )
        # Init run menu.
        run_menu = Menu(
            [(None, "編譯成目標文件", None),
             (None, "生成可執行文件", None),
             (None, "生成動態鏈接庫文件", None),
             (None, "運行", None),
             (None, "多模塊鏈接", None),
             (None, "調試", None),
             (None, "運行LINUX控製台程序", None)
             ]
            )
        # Init tool menu.
        tool_menu = Menu(
            [(None, "選項", None),
             (None, "計算器", lambda :open_gcalctool())
             ]
            )
        # Init help menu.
        help_menu = Menu(
            [(None, "幫助主題", None),
             (None, "關於", None),             
             ]
            )

        # Init root menu.
        self.root_menu = Menu(
            [(None, "文件", file_menu),
             (None, "編輯", edit_menu),
             (None, "運行", run_menu),
             (None, "工具", tool_menu),
             (None, "幫助", help_menu),
             ],
            True
            )
#.........這裏部分代碼省略.........
開發者ID:JamesLinus,項目名稱:assembly-ide,代碼行數:103,代碼來源:main.py

示例5: GameCenterApp

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class GameCenterApp(dbus.service.Object):

    def __init__(self, session_bus):
        dbus.service.Object.__init__(self, session_bus, GAME_CENTER_DBUS_PATH)
        self.conf_db = get_config_file("conf.db")
        self.in_wizard_showing = False

        self.init_ui()

    def init_ui(self):
        self.application = Application()
        self.application.set_default_size(1000, 660)
        self.application.set_skin_preview(get_common_image("frame.png"))
        self.application.set_icon(get_common_image("logo48.png"))
        self.application.add_titlebar(
                ["theme", "menu", "max","min", "close"],
                show_title=False
                )
        self.application.window.set_title(_("Deepin Games"))

        # Init page box.
        self.page_box = gtk.VBox()
        self.page_box.connect('expose-event', self.page_box_render)
        
        # Init page align.
        self.page_align = gtk.Alignment()
        self.page_align.set(0.5, 0.5, 1, 1)
        self.page_align.set_padding(0, 0, 2, 2)
        
        # Append page to switcher.
        self.paned_box = PanedBox(24)
        self.paned_box.add_content_widget(self.page_box)
        self.bottom_tip_bar = BottomTipBar()
        self.bottom_tip_bar.close_button.connect('clicked', lambda w: self.paned_box.bottom_window.hide())
        self.paned_box.add_bottom_widget(self.bottom_tip_bar)

        self.page_align.add(self.paned_box)
        self.application.main_box.pack_start(self.page_align, True, True)
        
        # Init status bar.
        self.statusbar = Statusbar(30)
        status_box = gtk.HBox()

        self.statusbar.status_box.pack_start(status_box, True, True)
        self.application.main_box.pack_start(self.statusbar, False, False)

        self.webview = WebView(COOKIE_FILE)
        webkit.set_web_database_directory_path(CACHE_DIR)
        web_settings = self.webview.get_settings()
        web_settings.set_property("enable-page-cache", True)
        web_settings.set_property("enable-offline-web-application-cache", True)
        #web_settings.set_property("enable-file-access-from-file-uris", True)
        web_settings.set_property("enable-xss-auditor", False)
        web_settings.set_property('enable-universal-access-from-file-uris', True)
        web_settings.set_property("enable-default-context-menu", False)
        self.webview.set_settings(web_settings)
        #self.webview.enable_inspector()
        self.webview.connect('new-window-policy-decision-requested', self.navigation_policy_decision_requested_cb)
        #self.webview.connect('notify::load-status', self.webview_load_status_handler)
        self.webview.connect('notify::title', self.webview_title_changed_handler)
        self.webview.connect('script-alert', self.webview_script_alert_handler)
        self.webview.connect('window-object-cleared', self.webview_window_object_cleared)
        #self.webview.connect('load-progress-changed', self.load_progress)
        
        self.home_url = urllib.basejoin(GAME_CENTER_SERVER_ADDRESS, 'game/?hl=%s' % LANGUAGE)
        self.network_failed_box = NetworkConnectFailed(self.check_network_connection)
        self.check_network_connection()
        #self.page_box.add(self.network_failed_box)

        self.navigatebar = Navigatebar(
                [
                (None, _("Home"), self.show_home_page),
                (None, _("Topics"), self.show_subject_page),
                (None, _("My Games"), self.show_mygame_page),
                ],
                font_size = 11,
                padding_x = 5,
                padding_y = 16,
                vertical=False,
                item_normal_pixbuf=DynamicPixbuf(get_common_image('top/nav_normal.png')),
                item_hover_pixbuf=DynamicPixbuf(get_common_image('top/nav_hover.png')),
                item_press_pixbuf=DynamicPixbuf(get_common_image('top/nav_press.png')),
                )
        self.navigatebar.set_size_request(-1, 56)
        self.navigatebar_align = gtk.Alignment(0, 0, 1, 1)
        self.navigatebar_align.set_padding(0, 0, 4, 0)
        self.navigatebar_align.add(self.navigatebar)
        self.application.titlebar.set_size_request(-1, 56)
        self.application.titlebar.left_box.pack_start(self.navigatebar_align, True, True)
        self.application.window.add_move_event(self.navigatebar)

        self.about_dialog = AboutDialog(_('About us'))
        self.about_dialog.set_transient_for(self.application.window)

        # Init menu.
        #if LANGUAGE == 'en_US':
            #menu_min_width = 185
        #else:
            #menu_min_width = 150

#.........這裏部分代碼省略.........
開發者ID:huowa222,項目名稱:deepin-game-center,代碼行數:103,代碼來源:game_center.py

示例6: GUI

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class GUI(object):
    """Media Player GUI kernel code.核心界麵代碼"""

    def __init__(self):
        """application."""
        self.__init_values()
        self.app = Application(False)
        # application set.
        app_w, app_h = 800, 570  # 初始化寬,高.
        min_app_w, min_app_h = 480, 300  # 防止超過,界麵布局被破壞.
        self.app.set_default_size(min_app_w, min_app_h)
        self.app.window.set_default_size(app_w, app_h)
        # self.app.window.resize
        image_dir = os.path.join(get_parent_dir(__file__, 2), "image")
        self.app.set_icon(os.path.join(image_dir, "icon.ico"))
        self.app.set_skin_preview(os.path.join(os.path.join(image_dir, "frame.png")))
        # set titlebar.
        self.app.add_titlebar(["theme", "menu", "max", "min", "close"],
                              os.path.join(os.path.join(image_dir, "logo.png")),
                              _("DPlayer"), " ",
                              add_separator=False)
        #
        self.play_menus = PlayMenus()
        # 設置主題菜單.
        self.app.set_menu_callback(lambda button: self.play_menus.show_theme_menu(button))
        #
        self.main_ali = gtk.Alignment()
        self.main_vbox = gtk.VBox()
        self.main_ali.add(self.main_vbox)
        self.main_ali.set(0, 0, 1.0, 1.0)
        self.main_ali.set_padding(0, 2, 2, 2)
        #
        self.mid_combo_event = gtk.EventBox()
        self.mid_combo_event.connect("expose-event", self.mid_combo_event_expose_event)
        self.screen_mid_combo = ScreenMidCombo()
        self.mid_combo_event.set_visible_window(True)
        self.mid_combo_event.add(self.screen_mid_combo)
        # movie screen. 電影播放屏幕.
        # 播放屏幕和播放列表的HBOX.
        self.play_list_view = PlayListView()
        self.screen_paned = Paned()
        self.screen_paned.paint_bottom_window = self.__paint_bottom_toolbar_background
        self.screen_frame = gtk.Alignment(0.0, 0.0, 1.0, 1.0)
        self.screen = gtk.DrawingArea()
        self.screen_frame.add(self.screen)
        self.top_toolbar = ToolBar()
        self.bottom_toolbar = BottomToolBar()
        # BUG: 當顯示上部工具條的時候,畫麵抖動.
        self.screen_paned.add_top_widget(self.top_toolbar.hbox_hframe)
        self.screen_paned.add_bottom_widget(self.bottom_toolbar.vbox)
        #self.screen_paned.add_mid_widget(self.screen_mid_combo)
        self.screen_paned.add_mid_widget(self.mid_combo_event)
        #
        self.screen_frame_event = self.screen_paned
        self.screen_paned.screen = self.screen
        #
        self.screen_paned.add1(self.screen_frame)
        self.screen_paned.add2(self.play_list_view.play_list_vbox)
        #
        self.play_control_panel = BottomToolBar(False)
        #
        self.main_vbox.pack_start(self.screen_paned, True, True)
        self.main_vbox.pack_start(self.play_control_panel.vbox, False, False)
        #
        self.app.main_box.pack_start(self.main_ali, True, True)

    def __init_values(self):
        self.child2_show_check = False  # True 顯示 False 隱藏

    ################################################################################
    ##
    def __paint_bottom_toolbar_background(self, e):
        # 將皮膚的圖片畫在bottom toolbar上,作為背景.
        cr = e.window.cairo_create()
        bottom_size = e.window.get_size()
        # draw background.
        cr.set_source_rgba(*alpha_color_hex_to_cairo(("#ebebeb", 0.1)))
        cr.rectangle(0, 0, bottom_size[0], bottom_size[1])
        cr.fill()
        # draw background pixbuf.
        pixbuf = skin_config.background_pixbuf
        app_h = self.app.window.allocation.height
        app_w = self.app.window.allocation.width
        bottom_h = bottom_size[1]
        # 當圖片的高度小雨窗口高度的時候,隻拿出圖片的最尾巴.
        if pixbuf.get_height() > app_h + bottom_h:
            h = app_h
        else:
            h = pixbuf.get_height() - bottom_h
            # 當圖片小於窗口寬度的時候,拉伸圖片.
        if pixbuf.get_width() < app_w:
            pixbuf = pixbuf.scale_simple(app_w,
                                         pixbuf.get_width(),
                                         gtk.gdk.INTERP_BILINEAR)

        draw_pixbuf(cr,
                    pixbuf,
                    0,
                    -h)

#.........這裏部分代碼省略.........
開發者ID:nohappiness,項目名稱:deepin-media-player,代碼行數:103,代碼來源:gui.py

示例7: UpdateManager

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class UpdateManager(dbus.service.Object):
    def __init__(self, session_bus):
        dbus.service.Object.__init__(self, session_bus, DSC_UPDATE_MANAGER_PATH)

        self.in_update_list = False
        self.in_upgrade_packages = False
        self.upgrade_pkg_infos = []

        self.application = Application()
        self.application.set_default_size(400, 250)
        self.application.add_titlebar(
                button_mask=['min', 'close'],
                app_name='Software Update Manager',
                )

        self.application.window.set_title("Software Update Manager")
        self.application.set_icon(get_common_image('update.png'))


        # Init page box.
        self.page_box = gtk.VBox()
        
        # Init page align.
        self.page_align = gtk.Alignment()
        self.page_align.set(0.5, 0.5, 1, 1)
        self.page_align.set_padding(0, 0, 2, 2)
        
        self.page_align.add(self.page_box)
        self.application.main_box.pack_start(self.page_align, True, True)
        
        # Init status bar.
        self.statusbar = Statusbar(28)
        status_box = gtk.HBox()

        self.statusbar.status_box.pack_start(status_box, True, True)
        self.application.main_box.pack_start(self.statusbar, False, False)

        self.background = BackgroundBox()
        self.background.draw_mask = self.draw_mask
        self.page_box.pack_start(self.background)

        self.upgrade_button = Button('更新軟件')
        self.upgrade_button.set_sensitive(False)

        button_box = gtk.HBox()
        button_box.pack_start(self.upgrade_button, False, False)

        button_box_align = gtk.Alignment(0.5, 0.5, 0, 0)
        button_box_align.set_padding(3, 8, 4, 4)
        button_box_align.add(button_box)

        self.statusbar.status_item_box.pack_start(button_box_align)

        self.update_info_label = Label("初始化...")
        self.update_info_label_align = create_align((0.5, 0.5, 0, 0))
        self.update_info_label_align.add(self.update_info_label)
        
        self.upgrade_button.connect('clicked', self.upgrade_packages)


    def draw_mask(self, cr, x, y, w, h):
        sidebar_color = ui_theme.get_color("menu_select_font").get_color()
        draw_vlinear(cr, x, y, w, h,
                     [(0, (sidebar_color, 0.9)),
                      (1, (sidebar_color, 0.9)),]
                     )

    def start_dsc_backend(self):
        self.system_bus = dbus.SystemBus()
        bus_object = self.system_bus.get_object(DSC_SERVICE_NAME, DSC_SERVICE_PATH)
        self.bus_interface = dbus.Interface(bus_object, DSC_SERVICE_NAME)
        self.system_bus.add_signal_receiver(
                self.backend_signal_receiver, 
                signal_name="update_signal", 
                dbus_interface=DSC_SERVICE_NAME, 
                path=DSC_SERVICE_PATH)

    def backend_signal_receiver(self, messages):
        for message in messages:
            (signal_type, action_content) = message
            
            if signal_type == "update-list-update":
                self.in_update_list = True
                message_str = "正在檢查更新,請稍等...(%s%%)" % int(float(action_content[0]))
                self.update_info_label.set_text(message_str)
                self.upgrade_button.set_sensitive(False)
            elif signal_type == 'update-list-finish':
                message_str = "正在檢查更新,請稍等..."
                self.update_info_label.set_text(message_str)
                self.in_update_list = False

                self.bus_interface.request_upgrade_pkgs(
                        reply_handler=self.render_upgrade_info, 
                        error_handler=lambda e:handle_dbus_error("request_upgrade_pkgs", e))
            elif signal_type == 'update-list-failed':
                message_str = '檢查更新失敗!'
                self.update_info_label.set_text(message_str)

            elif signal_type == 'upgrade-commit-update':
                pkg_names, action_type, percent, status = action_content
#.........這裏部分代碼省略.........
開發者ID:iceleaf916,項目名稱:software-update-manager,代碼行數:103,代碼來源:main.py

示例8: DeepinSoftwareCenter

# 需要導入模塊: from dtk.ui.application import Application [as 別名]
# 或者: from dtk.ui.application.Application import set_default_size [as 別名]
class DeepinSoftwareCenter(dbus.service.Object, Logger):
    '''
    class docs
    '''

    pages = ['home', 'upgrade', 'uninstall', 'install']

    def __init__(self, session_bus, arguments):
        '''
        init docs
        '''
        dbus.service.Object.__init__(self, session_bus, DSC_FRONTEND_PATH)
        Logger.__init__(self)

        self.simulate = "--simulate" in arguments

        global debug_flag
        debug_flag = "--debug" in arguments
        self.in_wizard_showing = False
        self.init_hide = False

    def exit(self):
        gtk.main_quit()

    def open_download_directory(self):
        run_command("xdg-open %s" % get_software_download_dir())

    def switch_page(self, page):
        switch_page(self.page_switcher, self.page_box, page, self.detail_page)

    def show_home_page(self):
        if self.detail_page and self.home_page:
            self.switch_page(self.home_page)

    def show_upgrade_page(self):
        if self.detail_page and self.upgrade_page:
            self.switch_page(self.upgrade_page)

    def show_uninstall_page(self):
        if self.detail_page and self.uninstall_page:
            self.switch_page(self.uninstall_page)

    def show_install_page(self):
        if self.detail_page and self.install_page:
            self.switch_page(self.install_page)

    @dbus.service.method(DSC_FRONTEND_NAME, in_signature="s", out_signature="")
    def show_page(self, key):
        try:
            index = self.pages.index(key)
            if index != self.navigatebar.get_index():
                method = "show_%s_page" % key
                getattr(self, method)()
                self.navigatebar.set_index(index)
        except:
            print "Unknow page:", key

    def init_ui(self):
        self.loginfo("Init ui")
        # Init application.
        self.application = Application(
            resizable=False,
            destroy_func=self.application_close_window,
            )
        self.application.set_default_size(888, 634)
        self.application.set_skin_preview(utils.get_common_image("frame.png"))
        self.application.set_icon(utils.get_common_image("logo48.png"))
        self.application.add_titlebar(
                ["theme", "menu", "min", "close"],
                show_title=False
                )
        self.application.window.set_title(_("Deepin Store"))
        self.application.window.connect("delete-event", self.application_close_window)

        # Init page box.
        self.page_box = gtk.VBox()

        # Init page switcher.
        self.page_switcher = HSlider(200)
        self.page_switcher.append_page(self.page_box)
        self.page_switcher.set_to_page(self.page_box)

        # Init page align.
        self.page_align = gtk.Alignment()
        self.page_align.set(0.5, 0.5, 1, 1)
        self.page_align.set_padding(0, 0, 2, 2)

        # Append page to switcher.
        self.paned_box = PanedBox(24)
        self.paned_box.add_content_widget(self.page_switcher)
        self.bottom_tip_bar = BottomTipBar()
        self.bottom_tip_bar.close_button.connect('clicked', lambda w: self.paned_box.bottom_window.hide())
        self.paned_box.add_bottom_widget(self.bottom_tip_bar)
        self.page_align.add(self.paned_box)
        self.application.main_box.pack_start(self.page_align, True, True)

        # Init status bar.
        self.statusbar = Statusbar(24)
        status_box = gtk.HBox()
        self.message_box = gtk.HBox()
#.........這裏部分代碼省略.........
開發者ID:kissthink,項目名稱:deepin-store,代碼行數:103,代碼來源:software_center.py


注:本文中的dtk.ui.application.Application.set_default_size方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。