Exemplo n.º 1
0
    def __init__(self, parent):
        tk.Frame.__init__(self, parent, background=style.w)
        self.yes_command = None

        self.usertext = scrolledText(self,
                                     wrap='word',
                                     font=style.hugeboldtext,
                                     padx=4 * style.offset,
                                     pady=4 * style.offset)
        self.usertext.place(relwidth=1,
                            relheight=1,
                            height=-(style.buttonsize + 2 * style.offset))

        self.yesnobuttonframe = tk.Frame(self,
                                         background=style.w,
                                         borderwidth=0,
                                         highlightthickness=0)
        self.yesnobuttonframe.place(relx=0.5,
                                    rely=1,
                                    y=-(style.buttonsize + style.offset),
                                    width=300,
                                    x=-150,
                                    height=style.buttonsize)

        self.yesbutton = button(self.yesnobuttonframe,
                                callback=self.on_yes,
                                text_string="Yes",
                                background=style.lg)
        self.yesbutton.place(relx=0, relwidth=0.33, relheight=1)

        self.nobutton = button(self.yesnobuttonframe,
                               callback=self.on_no,
                               text_string="No",
                               background=style.lg)
        self.nobutton.place(relx=0.67, relwidth=0.33, relheight=1)
Exemplo n.º 2
0
    def __init__(self, parent):
        tk.Frame.__init__(self, parent, background=style.color_1)

        self.usertext = scrolledText(self,
                                     wrap='word',
                                     font=style.hugeboldtext,
                                     padx=4 * style.offset,
                                     pady=4 * style.offset,
                                     background=style.color_1,
                                     foreground=style.w)
        self.usertext.place(relwidth=1,
                            relheight=1,
                            height=-(style.buttonsize + 2 * style.offset))

        self.yesnobuttonframe = tk.Frame(self,
                                         background=style.color_1,
                                         borderwidth=0,
                                         highlightthickness=0)
        self.yesnobuttonframe.place(relx=0.5,
                                    rely=1,
                                    y=-(style.buttonsize + style.offset),
                                    width=300,
                                    x=-150,
                                    height=style.buttonsize)

        self.yesbutton = button(self.yesnobuttonframe,
                                callback=self.hide,
                                text_string="OK",
                                background=style.color_2)
        self.yesbutton.place(relx=0.5,
                             x=-50,
                             width=100,
                             height=style.buttonsize)
Exemplo n.º 3
0
 def __init__(self, frame):
     ThemedFrame.__init__(self, frame, background=style.color_2)
     self.text = scrolledText(self,
                              wrap='word',
                              font=style.mediumtext,
                              background=style.color_2,
                              foreground=style.w,
                              borderwidth=0,
                              highlightthickness=0)
     self.text.place(relwidth=1, relheight=1)
Exemplo n.º 4
0
    def __init__(self, parent, controller):
        activeFrame.__init__(self, parent, controller)
        self.controller = controller
        self.appstore_handler = Store_handler
        self.package_parser = Parser
        self.selected_version = None
        self.version_index = None
        self.package = None

        self.bind("<Configure>", self.on_configure)

        self.column = ThemedFrame(self, background=style.color_1)
        self.column.place(relx=1,
                          rely=0,
                          width=style.sidecolumnwidth,
                          relheight=1,
                          x=-style.sidecolumnwidth)

        self.column_body = ThemedFrame(self.column, background=style.color_1)
        self.column_body.place(relwidth=1, relheight=1)

        self.column_title = ThemedLabel(self.column_body,
                                        "",
                                        anchor="w",
                                        font=style.mediumboldtext,
                                        foreground=style.w,
                                        background=style.color_1)
        self.column_title.place(x=style.offset,
                                width=-style.offset,
                                rely=0,
                                relwidth=1,
                                height=style.detailspagemultiplier)

        self.column_author = ThemedLabel(self.column_body,
                                         "",
                                         anchor="w",
                                         font=style.smalltext,
                                         foreground=style.w,
                                         background=style.color_1)
        self.column_author.place(x=style.offset,
                                 width=-style.offset,
                                 y=style.detailspagemultiplier,
                                 relwidth=1,
                                 height=0.333 * style.detailspagemultiplier)

        self.column_version = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_version.place(x=style.offset,
                                  width=-style.offset,
                                  y=1.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_license = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_license.place(x=style.offset,
                                  width=-style.offset,
                                  y=1.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_package = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_package.place(x=style.offset,
                                  width=-style.offset,
                                  y=2.000 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_downloads = ThemedLabel(self.column_body,
                                            "",
                                            anchor="w",
                                            font=style.smalltext,
                                            foreground=style.w,
                                            background=style.color_1)
        self.column_downloads.place(x=style.offset,
                                    width=-style.offset,
                                    y=2.333 * style.detailspagemultiplier,
                                    relwidth=1,
                                    height=0.333 * style.detailspagemultiplier)

        self.column_updated = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_updated.place(x=style.offset,
                                  width=-style.offset,
                                  y=2.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        # self.column_separator_top = ThemedLabel(self.column_body, "", background=style.lg)
        # self.column_separator_top.place(rely=1,relwidth = 1, x = + style.offset, y = - 3 * (style.buttonsize + style.offset) - 3 * style.offset - style.buttonsize - 1 - 0.5 * style.buttonsize, width = - 2 * style.offset, height = 1)

        # self.column_separator_bot = ThemedLabel(self.column_body, "", background=style.lg)
        # self.column_separator_bot.place(rely=1,relwidth = 1, x = + style.offset, y = - 3 * (style.buttonsize + style.offset) - style.offset - 1, width = - 2 * style.offset, height = 1)

        self.column_open_url_button = button(
            self.column_body,
            callback=self.trigger_open_tab,
            text_string="VISIT PAGE",
            font=style.mediumboldtext,
            background=style.color_2,
        ).place(rely=1,
                relwidth=1,
                x=+style.offset,
                y=-3 * (style.buttonsize + style.offset),
                width=-2 * style.offset,
                height=style.buttonsize)

        self.column_install_button = button(self.column_body,
                                            callback=self.trigger_install,
                                            text_string="INSTALL",
                                            font=style.mediumboldtext,
                                            background=style.color_2)
        self.column_install_button.place(rely=1,
                                         relwidth=1,
                                         x=+style.offset,
                                         y=-2 *
                                         (style.buttonsize + style.offset),
                                         width=-2 * style.offset,
                                         height=style.buttonsize)

        self.column_uninstall_button = button(self.column_body,
                                              callback=self.trigger_uninstall,
                                              text_string="UNINSTALL",
                                              font=style.mediumboldtext,
                                              background=style.color_2)

        self.back_image = ImageTk.PhotoImage(
            Image.open("assets/return.png").resize(
                (style.buttonsize, style.buttonsize), Image.ANTIALIAS))

        self.column_backbutton = button(self.column_body,
                                        image_object=self.back_image,
                                        callback=self.leave,
                                        background=style.color_1)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + style.offset))
        # self.column_backbutton_ttp = tooltip(self.column_backbutton,"Back to list")

        self.content_frame = ThemedFrame(self, background=style.color_2)
        self.content_frame.place(x=0,
                                 width=-style.sidecolumnwidth,
                                 rely=0,
                                 relheight=1,
                                 relwidth=1)

        self.content_frame_header = ThemedFrame(self.content_frame,
                                                background=style.color_2)
        self.content_frame_header.place(x=style.offset,
                                        width=-2 * style.offset,
                                        rely=0,
                                        relwidth=1,
                                        height=style.detailspagemultiplier)

        self.content_frame_body = ThemedFrame(self.content_frame,
                                              background=style.color_2)
        self.content_frame_body.place(x=style.offset,
                                      width=-2 * style.offset,
                                      y=style.detailspagemultiplier,
                                      relwidth=1,
                                      height=-style.detailspagemultiplier,
                                      relheight=1)

        self.content_banner_image_frame = ThemedFrame(self.content_frame,
                                                      background=style.color_2)
        self.content_banner_image_frame.place(
            x=0,
            y=+style.detailspagemultiplier,
            relwidth=1,
            height=-style.detailspagemultiplier,
            relheight=0.4)

        self.content_banner_image = ThemedLabel(
            self.content_banner_image_frame,
            "",
            background=style.color_2,
            foreground=style.w,
            anchor="center",
            wraplength=None)
        self.content_banner_image.place(x=0, y=0, relwidth=1, relheight=1)

        self.content_frame_details = scrolledText(self.content_frame_body,
                                                  wrap='word',
                                                  font=style.smalltext,
                                                  background=style.lg)
        self.content_frame_details.place(rely=0.4,
                                         relx=0,
                                         relwidth=1,
                                         relheight=0.6,
                                         x=+style.offset,
                                         width=-2 * (style.offset),
                                         height=-style.offset)

        #Displays app name
        self.header_label = ThemedLabel(self.content_frame_header,
                                        "",
                                        anchor="w",
                                        font=style.giantboldtext,
                                        background=style.color_2,
                                        foreground=style.b)
        self.header_label.place(rely=0, y=0, relheight=0.65)

        #Displays app name
        self.header_author = ThemedLabel(self.content_frame_header,
                                         "",
                                         anchor="w",
                                         font=style.smalltext,
                                         background=style.color_2,
                                         foreground=style.color_1)
        self.header_author.place(rely=0.65, y=0, relheight=0.35)

        self.progress_bar = progressFrame(self)

        self.yesnoPage = yesnoPage(self)
Exemplo n.º 5
0
    def __init__(self, parent, controller):
        activeFrame.__init__(self, parent, controller)
        self.controller = controller
        self.appstore_handler = controller.appstore_handler
        self.repo_parser = controller.repo_parser
        self.repo = None

        #------------------------------
        self.column = ThemedFrame(self, background=style.light_color)
        self.column.place(relx=1,
                          rely=0,
                          width=style.sidecolumnwidth,
                          relheight=1,
                          x=-style.sidecolumnwidth)

        self.column_body = ThemedFrame(self.column,
                                       background=style.light_color)
        self.column_body.place(relwidth=1, relheight=1)

        self.column_title = ThemedLabel(self.column_body,
                                        "",
                                        anchor="w",
                                        label_font=style.mediumboldtext,
                                        foreground=style.w,
                                        background=style.light_color)
        self.column_title.place(x=5,
                                width=-5,
                                rely=0,
                                relwidth=1,
                                height=style.headerheight)

        #------------------------------
        self.column_author = ThemedLabel(self.column_body,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         foreground=style.w,
                                         background=style.light_color)
        self.column_author.place(x=5,
                                 width=-5,
                                 y=style.detailspagemultiplier,
                                 relwidth=1,
                                 height=0.333 * style.detailspagemultiplier)

        self.column_version = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.light_color)
        self.column_version.place(x=5,
                                  width=-5,
                                  y=1.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_license = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.light_color)
        self.column_license.place(x=5,
                                  width=-5,
                                  y=1.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)
        #------------------------------

        #------------------------------
        self.column_package = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.light_color)
        self.column_package.place(x=5,
                                  width=-5,
                                  y=2.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_downloads = ThemedLabel(self.column_body,
                                            "",
                                            anchor="w",
                                            label_font=style.smalltext,
                                            foreground=style.w,
                                            background=style.light_color)
        self.column_downloads.place(x=5,
                                    width=-5,
                                    y=2.666 * style.detailspagemultiplier,
                                    relwidth=1,
                                    height=0.333 * style.detailspagemultiplier)

        self.column_updated = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.light_color)
        self.column_updated.place(x=5,
                                  width=-5,
                                  y=3.00 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)
        #------------------------------

        #------------------------------
        self.column_downloaded = ThemedLabel(self.column_body,
                                             "",
                                             anchor="w",
                                             label_font=style.smalltext,
                                             foreground=style.w,
                                             background=style.light_color)
        self.column_downloaded.place(x=5,
                                     width=-5,
                                     y=3.66 * style.detailspagemultiplier,
                                     relwidth=1,
                                     height=0.333 *
                                     style.detailspagemultiplier)
        #------------------------------

        self.column_extracted = ThemedLabel(self.column_body,
                                            "",
                                            anchor="w",
                                            label_font=style.smalltext,
                                            foreground=style.w,
                                            background=style.light_color)
        self.column_extracted.place(x=5,
                                    width=-5,
                                    y=4 * style.detailspagemultiplier,
                                    relwidth=1,
                                    height=0.333 * style.detailspagemultiplier)

        self.column_open_url_button = button(
            self.column_body,
            callback=self.trigger_open_tab,
            text_string="VISIT PAGE",
            font=style.mediumboldtext,
            background=style.dark_color).place(
                rely=1,
                relx=0.5,
                x=-1.5 * (style.buttonsize),
                y=-4 * (style.buttonsize + style.offset),
                width=3 * style.buttonsize,
                height=style.buttonsize)

        self.column_install_button = button(self.column_body,
                                            callback=self.trigger_install,
                                            text_string="INSTALL",
                                            font=style.mediumboldtext,
                                            background=style.dark_color)
        self.column_install_button.place(rely=1,
                                         relx=0.5,
                                         x=-1.5 * (style.buttonsize),
                                         y=-3 *
                                         (style.buttonsize + style.offset),
                                         width=3 * style.buttonsize,
                                         height=style.buttonsize)

        self.column_uninstall_button = button(self.column_body,
                                              callback=self.trigger_uninstall,
                                              text_string="UNINSTALL",
                                              font=style.mediumboldtext,
                                              background=style.dark_color)

        self.back_image = ImageTk.PhotoImage(
            Image.open(locations.backimage).resize(
                (style.buttonsize, style.buttonsize), Image.ANTIALIAS))

        self.column_backbutton = button(self.column_body,
                                        image_object=self.back_image,
                                        callback=self.leave,
                                        background=style.light_color)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + style.offset))
        self.column_backbutton_ttp = tooltip(self.column_backbutton,
                                             "Back to list")

        self.content_frame = ThemedFrame(self, background=style.w)
        self.content_frame.place(x=0,
                                 width=-style.sidecolumnwidth,
                                 rely=0,
                                 relheight=1,
                                 relwidth=1)

        self.content_frame_header = ThemedFrame(self.content_frame,
                                                background=style.w)
        self.content_frame_header.place(x=style.offset,
                                        width=-2 * style.offset,
                                        rely=0,
                                        relwidth=1,
                                        height=style.detailspagemultiplier)

        self.content_frame_body = ThemedFrame(self.content_frame,
                                              background=style.w)
        self.content_frame_body.place(x=style.offset,
                                      width=-2 * style.offset,
                                      y=style.detailspagemultiplier,
                                      relwidth=1,
                                      height=-style.detailspagemultiplier,
                                      relheight=1)

        self.content_banner_image = ThemedLabel(self.content_frame_body,
                                                "",
                                                background=style.w,
                                                foreground=style.w,
                                                anchor="center",
                                                wraplength=None)
        self.content_banner_image.place(x=0, y=0, relwidth=1, relheight=0.5)

        self.content_frame_details = scrolledText(self.content_frame_body,
                                                  wrap='word',
                                                  font=style.smalltext)
        self.content_frame_details.place(rely=0.5,
                                         relx=0,
                                         relwidth=1,
                                         relheight=0.5,
                                         x=+style.offset,
                                         width=-2 * (style.offset),
                                         height=-style.offset)

        #Displays app name
        self.header_label = ThemedLabel(self.content_frame_header,
                                        "",
                                        anchor="w",
                                        label_font=style.giantboldtext,
                                        background=style.w,
                                        foreground=style.b)
        self.header_label.place(rely=0, y=0, relheight=0.65)

        #Displays app name
        self.header_author = ThemedLabel(self.content_frame_header,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         background=style.w,
                                         foreground=style.light_color)
        self.header_author.place(rely=0.65, y=0, relheight=0.35)

        self.progress_bar = progressFrame(self)

        self.yesnoPage = yesnoPage(self)
Exemplo n.º 6
0
    def __init__(self, parent, controller):
        activeFrame.__init__(self, parent, controller)
        self.controller = controller
        self.appstore_handler = controller.appstore_handler
        self.repo_parser = controller.repo_parser
        self.selected_version = None
        self.version_index = None
        self.repo = None

        self.bind("<Configure>", self.on_configure)

        #------------------------------
        self.column = ThemedFrame(self, background=style.color_1)
        self.column.place(relx=1,
                          rely=0,
                          width=style.sidecolumnwidth,
                          relheight=1,
                          x=-style.sidecolumnwidth)

        self.column_body = ThemedFrame(self.column, background=style.color_1)
        self.column_body.place(relwidth=1, relheight=1)

        self.column_title = ThemedLabel(self.column_body,
                                        "",
                                        anchor="w",
                                        label_font=style.mediumboldtext,
                                        foreground=style.w,
                                        background=style.color_1)
        self.column_title.place(x=5,
                                width=-5,
                                rely=0,
                                relwidth=1,
                                height=style.detailspagemultiplier)

        #------------------------------
        self.column_author = ThemedLabel(self.column_body,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         foreground=style.w,
                                         background=style.color_1)
        self.column_author.place(x=5,
                                 width=-5,
                                 y=style.detailspagemultiplier,
                                 relwidth=1,
                                 height=0.333 * style.detailspagemultiplier)

        self.column_version = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_version.place(x=5,
                                  width=-5,
                                  y=1.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_license = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_license.place(x=5,
                                  width=-5,
                                  y=1.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)
        #------------------------------

        #------------------------------
        self.column_package = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_package.place(x=5,
                                  width=-5,
                                  y=2.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_downloads = ThemedLabel(self.column_body,
                                            "",
                                            anchor="w",
                                            label_font=style.smalltext,
                                            foreground=style.w,
                                            background=style.color_1)
        self.column_downloads.place(x=5,
                                    width=-5,
                                    y=2.666 * style.detailspagemultiplier,
                                    relwidth=1,
                                    height=0.333 * style.detailspagemultiplier)

        self.column_updated = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_updated.place(x=5,
                                  width=-5,
                                  y=3.00 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)
        #------------------------------

        self.releases_listbox = ScrolledThemedListBox(self.column_body)
        self.releases_listbox.configure(activestyle="none")
        self.releases_listbox.place(
            relwidth=1,
            y=3.66 * style.detailspagemultiplier,
            relheight=1,
            height=-(3.66 * style.detailspagemultiplier + 3 *
                     (style.buttonsize + style.offset) + style.offset))

        self.releases_listbox.bind('<<ListboxSelect>>', self.select_version)

        self.column_open_url_button = button(
            self.column_body,
            callback=self.trigger_open_tab,
            text_string="VISIT PAGE",
            font=style.mediumboldtext,
            background=style.color_2,
        ).place(rely=1,
                relx=0.5,
                x=-1.5 * (style.buttonsize),
                y=-3 * (style.buttonsize + style.offset),
                width=3 * style.buttonsize,
                height=style.buttonsize)

        self.column_install_button = button(self.column_body,
                                            callback=self.trigger_install,
                                            text_string="INSTALL",
                                            font=style.mediumboldtext,
                                            background=style.color_2)
        self.column_install_button.place(rely=1,
                                         relx=0.5,
                                         x=-1.5 * (style.buttonsize),
                                         y=-2 *
                                         (style.buttonsize + style.offset),
                                         width=3 * style.buttonsize,
                                         height=style.buttonsize)

        self.column_uninstall_button = button(self.column_body,
                                              callback=self.trigger_uninstall,
                                              text_string="UNINSTALL",
                                              font=style.mediumboldtext,
                                              background=style.color_2)

        self.back_image = ImageTk.PhotoImage(
            Image.open(locations.backimage).resize(
                (style.buttonsize, style.buttonsize), Image.ANTIALIAS))

        self.column_backbutton = button(self.column_body,
                                        image_object=self.back_image,
                                        callback=self.leave,
                                        background=style.color_1)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + style.offset))
        # self.column_backbutton_ttp = tooltip(self.column_backbutton,"Back to list")

        self.content_frame = ThemedFrame(self, background=style.color_2)
        self.content_frame.place(x=0,
                                 width=-style.sidecolumnwidth,
                                 rely=0,
                                 relheight=1,
                                 relwidth=1)

        self.content_frame_header = ThemedFrame(self.content_frame,
                                                background=style.color_2)
        self.content_frame_header.place(x=style.offset,
                                        width=-2 * style.offset,
                                        rely=0,
                                        relwidth=1,
                                        height=style.detailspagemultiplier)

        self.content_frame_body = ThemedFrame(self.content_frame,
                                              background=style.color_2)
        self.content_frame_body.place(x=style.offset,
                                      width=-2 * style.offset,
                                      y=style.detailspagemultiplier,
                                      relwidth=1,
                                      height=-style.detailspagemultiplier,
                                      relheight=1)

        self.content_banner_image_frame = ThemedFrame(self.content_frame,
                                                      background=style.color_2)
        self.content_banner_image_frame.place(
            x=0,
            y=+style.detailspagemultiplier,
            relwidth=1,
            height=-style.detailspagemultiplier,
            relheight=0.4)

        self.content_banner_image = ThemedLabel(
            self.content_banner_image_frame,
            "",
            background=style.color_2,
            foreground=style.w,
            anchor="center",
            wraplength=None)
        self.content_banner_image.place(x=0, y=0, relwidth=1, relheight=1)

        self.content_frame_details = scrolledText(self.content_frame_body,
                                                  wrap='word',
                                                  font=style.smalltext,
                                                  background=style.lg)
        self.content_frame_details.place(rely=0.4,
                                         relx=0,
                                         relwidth=1,
                                         relheight=0.25,
                                         x=+style.offset,
                                         width=-2 * (style.offset),
                                         height=-style.offset)

        self.content_frame_patch_notes_label = ThemedLabel(
            self.content_frame_body,
            "Release notes:",
            anchor="w",
            label_font=style.mediumboldtext,
            foreground=style.b,
            background=style.color_2)
        self.content_frame_patch_notes_label.place(
            relx=0.5,
            width=self.content_frame_patch_notes_label.winfo_reqwidth(),
            rely=0.65,
            y=+style.offset,
            x=-0.5 * self.content_frame_patch_notes_label.winfo_reqwidth(),
            height=0.33 * style.detailspagemultiplier)

        self.content_frame_version_details = scrolledText(
            self.content_frame_body,
            wrap='word',
            font=style.smalltext,
            background=style.lg)
        self.content_frame_version_details.place(
            rely=0.65,
            y=+style.offset + 0.33 * style.detailspagemultiplier,
            relx=0,
            relwidth=1,
            relheight=0.35,
            height=-(2 * style.offset + 0.33 * style.detailspagemultiplier),
            x=+style.offset,
            width=-2 * (style.offset))

        #Displays app name
        self.header_label = ThemedLabel(self.content_frame_header,
                                        "",
                                        anchor="w",
                                        label_font=style.giantboldtext,
                                        background=style.color_2,
                                        foreground=style.b)
        self.header_label.place(rely=0, y=0, relheight=0.65)

        #Displays app name
        self.header_author = ThemedLabel(self.content_frame_header,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         background=style.color_2,
                                         foreground=style.color_1)
        self.header_author.place(rely=0.65, y=0, relheight=0.35)

        self.progress_bar = progressFrame(self)

        self.yesnoPage = yesnoPage(self)
Exemplo n.º 7
0
    def __init__(self, parent, controller):
        activeFrame.__init__(self, parent, controller)
        self.controller = controller
        self.appstore_handler = store_handler
        self.repo_parser = repo_parser
        self.selected_version = None
        self.version_index = None
        self.repo = None
        self.package = None

        self.bind("<Configure>", self.on_configure)

        self.column = ThemedFrame(self, background=style.color_1)
        self.column.place(relx=1,
                          rely=0,
                          width=style.sidecolumnwidth,
                          relheight=1,
                          x=-style.sidecolumnwidth)

        self.column_body = ThemedFrame(self.column, background=style.color_1)
        self.column_body.place(relwidth=1, relheight=1)

        self.column_title = ThemedLabel(self.column_body,
                                        "",
                                        anchor="w",
                                        label_font=style.mediumboldtext,
                                        foreground=style.w,
                                        background=style.color_1)
        self.column_title.place(x=style.offset,
                                width=-style.offset,
                                rely=0,
                                relwidth=1,
                                height=style.detailspagemultiplier)

        self.column_author = ThemedLabel(self.column_body,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         foreground=style.w,
                                         background=style.color_1)
        self.column_author.place(x=style.offset,
                                 width=-style.offset,
                                 y=style.detailspagemultiplier,
                                 relwidth=1,
                                 height=0.333 * style.detailspagemultiplier)

        self.column_version = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_version.place(x=style.offset,
                                  width=-style.offset,
                                  y=1.333 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_license = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_license.place(x=style.offset,
                                  width=-style.offset,
                                  y=1.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_package = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_package.place(x=style.offset,
                                  width=-style.offset,
                                  y=2.000 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_downloads = ThemedLabel(self.column_body,
                                            "",
                                            anchor="w",
                                            label_font=style.smalltext,
                                            foreground=style.w,
                                            background=style.color_1)
        self.column_downloads.place(x=style.offset,
                                    width=-style.offset,
                                    y=2.333 * style.detailspagemultiplier,
                                    relwidth=1,
                                    height=0.333 * style.detailspagemultiplier)

        self.column_updated = ThemedLabel(self.column_body,
                                          "",
                                          anchor="w",
                                          label_font=style.smalltext,
                                          foreground=style.w,
                                          background=style.color_1)
        self.column_updated.place(x=style.offset,
                                  width=-style.offset,
                                  y=2.666 * style.detailspagemultiplier,
                                  relwidth=1,
                                  height=0.333 * style.detailspagemultiplier)

        self.column_separator_top = ThemedLabel(self.column_body,
                                                "",
                                                background=style.lg)
        self.column_separator_top.place(
            rely=1,
            relwidth=1,
            x=+style.offset,
            y=-3 * (style.buttonsize + style.offset) - 3 * style.offset -
            style.buttonsize - 1 - 0.5 * style.buttonsize,
            width=-2 * style.offset,
            height=1)

        self.tags_menu_label = ThemedLabel(self.column_body,
                                           "Releases:",
                                           anchor="w",
                                           label_font=style.smallboldtext,
                                           foreground=style.w,
                                           background=style.color_1)
        self.tags_menu_label.place(rely=1,
                                   relwidth=1,
                                   x=+style.offset,
                                   y=-3 * (style.buttonsize + style.offset) -
                                   2 * style.offset - style.buttonsize - 1 -
                                   0.5 * style.buttonsize,
                                   width=-2 * style.offset,
                                   height=0.5 * style.buttonsize)

        self.TAGS_LIST = ["You shouldn't be seeing this"]
        self.selected_tag_name = tk.StringVar()
        self.selected_tag_name.set(None)
        self.tags_dropdown = tk.OptionMenu(self.column_body,
                                           self.selected_tag_name,
                                           *self.TAGS_LIST)
        self.tags_dropdown.configure(foreground=style.w)
        self.tags_dropdown.configure(background=style.color_2)
        self.tags_dropdown.configure(highlightthickness=0)
        self.tags_dropdown.configure(borderwidth=0)
        self.tags_dropdown.place(rely=1,
                                 relwidth=1,
                                 x=+style.offset,
                                 y=-3 * (style.buttonsize + style.offset) -
                                 2 * style.offset - style.buttonsize - 1,
                                 width=-2 * style.offset,
                                 height=style.buttonsize)

        self.column_separator_bot = ThemedLabel(self.column_body,
                                                "",
                                                background=style.lg)
        self.column_separator_bot.place(
            rely=1,
            relwidth=1,
            x=+style.offset,
            y=-3 * (style.buttonsize + style.offset) - style.offset - 1,
            width=-2 * style.offset,
            height=1)

        self.column_open_url_button = button(
            self.column_body,
            callback=self.trigger_open_tab,
            text_string="VISIT PAGE",
            font=style.mediumboldtext,
            background=style.color_2,
        ).place(rely=1,
                relwidth=1,
                x=+style.offset,
                y=-3 * (style.buttonsize + style.offset),
                width=-2 * style.offset,
                height=style.buttonsize)

        self.column_install_button = button(self.column_body,
                                            callback=self.trigger_install,
                                            text_string="INSTALL",
                                            font=style.mediumboldtext,
                                            background=style.color_2)
        self.column_install_button.place(rely=1,
                                         relwidth=1,
                                         x=+style.offset,
                                         y=-2 *
                                         (style.buttonsize + style.offset),
                                         width=-2 * style.offset,
                                         height=style.buttonsize)

        self.column_uninstall_button = button(self.column_body,
                                              callback=self.trigger_uninstall,
                                              text_string="UNINSTALL",
                                              font=style.mediumboldtext,
                                              background=style.color_2)

        self.back_image = ImageTk.PhotoImage(
            Image.open(locations.backimage).resize(
                (style.buttonsize, style.buttonsize), Image.ANTIALIAS))

        self.column_backbutton = button(self.column_body,
                                        image_object=self.back_image,
                                        callback=self.leave,
                                        background=style.color_1)
        self.column_backbutton.place(rely=1,
                                     relx=1,
                                     x=-(style.buttonsize + style.offset),
                                     y=-(style.buttonsize + style.offset))
        # self.column_backbutton_ttp = tooltip(self.column_backbutton,"Back to list")

        self.content_frame = ThemedFrame(self, background=style.color_2)
        self.content_frame.place(x=0,
                                 width=-style.sidecolumnwidth,
                                 rely=0,
                                 relheight=1,
                                 relwidth=1)

        self.content_frame_header = ThemedFrame(self.content_frame,
                                                background=style.color_2)
        self.content_frame_header.place(x=style.offset,
                                        width=-2 * style.offset,
                                        rely=0,
                                        relwidth=1,
                                        height=style.detailspagemultiplier)

        self.content_frame_body = ThemedFrame(self.content_frame,
                                              background=style.color_2)
        self.content_frame_body.place(x=style.offset,
                                      width=-2 * style.offset,
                                      y=style.detailspagemultiplier,
                                      relwidth=1,
                                      height=-style.detailspagemultiplier,
                                      relheight=1)

        self.content_banner_image_frame = ThemedFrame(self.content_frame,
                                                      background=style.color_2)
        self.content_banner_image_frame.place(
            x=0,
            y=+style.detailspagemultiplier,
            relwidth=1,
            height=-style.detailspagemultiplier,
            relheight=0.4)

        self.content_banner_image = ThemedLabel(
            self.content_banner_image_frame,
            "",
            background=style.color_2,
            foreground=style.w,
            anchor="center",
            wraplength=None)
        self.content_banner_image.place(x=0, y=0, relwidth=1, relheight=1)

        self.content_frame_details = scrolledText(self.content_frame_body,
                                                  wrap='word',
                                                  font=style.smalltext,
                                                  background=style.lg)
        self.content_frame_details.place(rely=0.4,
                                         relx=0,
                                         relwidth=1,
                                         relheight=0.25,
                                         x=+style.offset,
                                         width=-2 * (style.offset),
                                         height=-style.offset)

        self.content_frame_patch_notes_label = ThemedLabel(
            self.content_frame_body,
            "Release notes:",
            anchor="w",
            label_font=style.mediumboldtext,
            foreground=style.b,
            background=style.color_2)
        self.content_frame_patch_notes_label.place(
            relx=0.5,
            width=self.content_frame_patch_notes_label.winfo_reqwidth(),
            rely=0.65,
            y=+style.offset,
            x=-0.5 * self.content_frame_patch_notes_label.winfo_reqwidth(),
            height=0.33 * style.detailspagemultiplier)

        self.content_frame_version_details = scrolledText(
            self.content_frame_body,
            wrap='word',
            font=style.smalltext,
            background=style.lg)
        self.content_frame_version_details.place(
            rely=0.65,
            y=+style.offset + 0.33 * style.detailspagemultiplier,
            relx=0,
            relwidth=1,
            relheight=0.35,
            height=-(2 * style.offset + 0.33 * style.detailspagemultiplier),
            x=+style.offset,
            width=-2 * (style.offset))

        #Displays app name
        self.header_label = ThemedLabel(self.content_frame_header,
                                        "",
                                        anchor="w",
                                        label_font=style.giantboldtext,
                                        background=style.color_2,
                                        foreground=style.b)
        self.header_label.place(rely=0, y=0, relheight=0.65)

        #Displays app name
        self.header_author = ThemedLabel(self.content_frame_header,
                                         "",
                                         anchor="w",
                                         label_font=style.smalltext,
                                         background=style.color_2,
                                         foreground=style.color_1)
        self.header_author.place(rely=0.65, y=0, relheight=0.35)

        self.progress_bar = progressFrame(self)

        self.yesnoPage = yesnoPage(self)