Mark label for external links. attrib str to be complete.

This commit is contained in:
Mizaki 2023-01-22 17:16:33 +00:00
parent 5d66815765
commit d0e3b487eb
6 changed files with 10 additions and 8 deletions

View File

@ -77,9 +77,7 @@ class IssueSelectionWindow(QtWidgets.QDialog):
self.issue_list: list[ComicIssue] = []
# Display talker logo and set url
self.lblIssuesSourceName.setText(
f'{talker_api.static_options.attribution_string} <a href="{talker_api.static_options.website}">{talker_api.source_details.name}</a>'
)
self.lblIssuesSourceName.setText(talker_api.static_options.attribution_string)
self.imageIssuesSourceWidget = CoverImageWidget(
self.imageIssuesSourceLogo,

View File

@ -162,9 +162,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog):
self.talker_api = talker_api
# Display talker logo and set url
self.lblSourceName.setText(
f'{talker_api.static_options.attribution_string} <a href="{talker_api.static_options.website}">{talker_api.source_details.name}</a>'
)
self.lblSourceName.setText(talker_api.static_options.attribution_string)
self.imageSourceWidget = CoverImageWidget(
self.imageSourceLogo,

View File

@ -140,6 +140,9 @@
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -85,6 +85,9 @@
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -40,7 +40,7 @@ class SourceStaticOptions:
def __init__(
self,
website: str = "",
attribution_string: str = "", # Website link will be added after this text using source_details.name
attribution_string: str = "", # Full string including web link: Source: <a href='http://website'>Example</a>
has_issues: bool = False,
has_alt_covers: bool = False,
requires_apikey: bool = False,

View File

@ -174,7 +174,7 @@ class ComicVineTalker(ComicTalker):
)
self.static_options = SourceStaticOptions(
website="https://comicvine.gamespot.com/",
attribution_string="Data Source:",
attribution_string="Data Source: <a href='https://comicvine.gamespot.com/'>Comic Vine</a>",
has_issues=True,
has_alt_covers=True,
requires_apikey=True,