settings.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:games_nebula_goglib_scripts 作者: yancharkin 项目源码 文件源码
def create_main_window(self):

        self.main_window = Gtk.Window(
            title = _("Pathologic Classic HD"),
            type = Gtk.WindowType.TOPLEVEL,
            window_position = Gtk.WindowPosition.CENTER_ALWAYS,
            resizable = False,
            default_width = 360
            )
        self.main_window.connect('delete-event', self.quit_app)

        frame_crop = Gtk.Frame(
            label = _("Crop videos (FFmpeg)"),
            label_xalign = 0.5,
            margin_left = 10,
            margin_right = 10,
            margin_top = 10,
            margin_bottom = 10
            )

        box_frame_crop = Gtk.Box(
            orientation = Gtk.Orientation.VERTICAL,
            margin_left = 10,
            margin_right = 10,
            margin_top = 10,
            margin_bottom = 10,
            spacing = 10
            )

        self.combobox_crop = Gtk.ComboBoxText()
        self.combobox_crop.append_text(_("4:3 (no cropping)"))
        self.combobox_crop.append_text('16:9')
        self.combobox_crop.append_text('16:10')
        self.combobox_crop.set_active(self.crop)

        self.button_crop = Gtk.Button(label=_("Crop and quit"))
        self.button_crop.connect('clicked', self.cb_button_crop)

        self.progressbar = Gtk.ProgressBar(
            hexpand = True,
            show_text = True,
            text = _("Processing..."),
            pulse_step = 0.1,
            no_show_all = True
            )

        box_frame_crop.pack_start(self.combobox_crop, True, True, 0)
        box_frame_crop.pack_start(self.button_crop, True, True, 0)
        box_frame_crop.pack_start(self.progressbar, True, True, 0)

        frame_crop.add(box_frame_crop)

        self.main_window.add(frame_crop)
        self.main_window.show_all()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号