mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-07-01 12:26:26 +00:00
wip: arcaea-offline==0.2.0
- fix viewing/database read references of `ScoreInsert`
This commit is contained in:
@ -20,9 +20,9 @@ from .base import TextSegmentDelegate
|
||||
|
||||
def chartToRichText(chart: Chart):
|
||||
if isinstance(chart, Chart):
|
||||
text = f"{chart.name_en} [{rating_class_to_short_text(chart.rating_class)}]"
|
||||
text = f"{chart.title} [{rating_class_to_short_text(chart.rating_class)}]"
|
||||
text += "<br>"
|
||||
text += f'<font color="gray">({chart.song_id}, {chart.package_id})</font>'
|
||||
text += f'<font color="gray">({chart.song_id}, {chart.set})</font>'
|
||||
else:
|
||||
text = "(unknown chart)"
|
||||
return text
|
||||
@ -94,7 +94,7 @@ class ChartDelegate(TextSegmentDelegate):
|
||||
|
||||
return [
|
||||
[
|
||||
{self.TextRole: f"{chart.name_en}"},
|
||||
{self.TextRole: f"{chart.title}"},
|
||||
],
|
||||
[
|
||||
{
|
||||
@ -104,7 +104,7 @@ class ChartDelegate(TextSegmentDelegate):
|
||||
],
|
||||
[
|
||||
{
|
||||
self.TextRole: f"({chart.song_id}, {chart.package_id})",
|
||||
self.TextRole: f"({chart.song_id}, {chart.set})",
|
||||
self.ColorRole: option.widget.palette().placeholderText().color(),
|
||||
},
|
||||
],
|
||||
|
@ -95,7 +95,7 @@ class ScoreDelegate(TextSegmentDelegate):
|
||||
chart = self.getChart(index)
|
||||
|
||||
if isinstance(score, Score) and isinstance(chart, Chart):
|
||||
scoreRange = calculate_score_range(chart, score.pure, score.far)
|
||||
scoreRange = calculate_score_range(chart.note, score.pure, score.far)
|
||||
return scoreRange[0] <= score.score <= scoreRange[1]
|
||||
|
||||
def getScoreGradeGradientWrapper(self, score: int):
|
||||
@ -152,9 +152,11 @@ class ScoreDelegate(TextSegmentDelegate):
|
||||
],
|
||||
[
|
||||
{
|
||||
self.TextRole: QDateTime.fromSecsSinceEpoch(score.time).toString(
|
||||
self.TextRole: QDateTime.fromSecsSinceEpoch(score.date).toString(
|
||||
"yyyy-MM-dd hh:mm:ss"
|
||||
)
|
||||
if score.date
|
||||
else "-- No Date --"
|
||||
}
|
||||
],
|
||||
]
|
||||
|
Reference in New Issue
Block a user