File: help_button.py

package info (click to toggle)
fs-uae-arcade 3.1.63-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 24,456 kB
  • sloc: python: 56,011; makefile: 170
file content (18 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from fsbc.desktop import open_url_in_browser
import workspace
import workspace.ui


class HelpButton(workspace.ui.ImageButton):
    def __init__(self, parent, url):
        super().__init__(
            parent,
            workspace.ui.Image(
                workspace.Stream(__name__, "data/16x16/information.png")
            ),
        )
        self.url = url
        self.set_min_width(40)

    def on_activate(self):
        open_url_in_browser(self.url)