Add attrib string for source. Add logo and URL to issues window.
This commit is contained in:
parent
55e3b7c7e0
commit
5d66815765
@ -76,6 +76,23 @@ class IssueSelectionWindow(QtWidgets.QDialog):
|
||||
self.url_fetch_thread = None
|
||||
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.imageIssuesSourceWidget = CoverImageWidget(
|
||||
self.imageIssuesSourceLogo,
|
||||
CoverImageWidget.URLMode,
|
||||
options.runtime_config.user_cache_dir,
|
||||
talker_api,
|
||||
False,
|
||||
)
|
||||
gridlayoutIssuesSourceLogo = QtWidgets.QGridLayout(self.imageIssuesSourceLogo)
|
||||
gridlayoutIssuesSourceLogo.addWidget(self.imageIssuesSourceWidget)
|
||||
gridlayoutIssuesSourceLogo.setContentsMargins(0, 2, 0, 0)
|
||||
self.imageIssuesSourceWidget.set_url(talker_api.source_details.logo)
|
||||
|
||||
if issue_number is None or issue_number == "":
|
||||
self.issue_number = "1"
|
||||
else:
|
||||
|
@ -163,7 +163,7 @@ class SeriesSelectionWindow(QtWidgets.QDialog):
|
||||
|
||||
# Display talker logo and set url
|
||||
self.lblSourceName.setText(
|
||||
f'Data Source: <a href="{talker_api.static_options.website}">{talker_api.source_details.name}</a>'
|
||||
f'{talker_api.static_options.attribution_string} <a href="{talker_api.static_options.website}">{talker_api.source_details.name}</a>'
|
||||
)
|
||||
|
||||
self.imageSourceWidget = CoverImageWidget(
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>872</width>
|
||||
<height>550</height>
|
||||
<height>670</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -74,9 +74,6 @@
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="teDescription">
|
||||
@ -93,20 +90,75 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="coverImageContainer" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="coverImageContainer" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>450</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="midLineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblIssuesSourceName">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Data Source:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="imageIssuesSourceLogo" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -40,6 +40,7 @@ class SourceStaticOptions:
|
||||
def __init__(
|
||||
self,
|
||||
website: str = "",
|
||||
attribution_string: str = "", # Website link will be added after this text using source_details.name
|
||||
has_issues: bool = False,
|
||||
has_alt_covers: bool = False,
|
||||
requires_apikey: bool = False,
|
||||
@ -47,6 +48,7 @@ class SourceStaticOptions:
|
||||
has_censored_covers: bool = False,
|
||||
) -> None:
|
||||
self.website = website
|
||||
self.attribution_string = attribution_string
|
||||
self.has_issues = has_issues
|
||||
self.has_alt_covers = has_alt_covers
|
||||
self.requires_apikey = requires_apikey
|
||||
|
@ -174,6 +174,7 @@ class ComicVineTalker(ComicTalker):
|
||||
)
|
||||
self.static_options = SourceStaticOptions(
|
||||
website="https://comicvine.gamespot.com/",
|
||||
attribution_string="Data Source:",
|
||||
has_issues=True,
|
||||
has_alt_covers=True,
|
||||
requires_apikey=True,
|
||||
|
Loading…
Reference in New Issue
Block a user