mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
ChanViewer: Show thread subjects in the catalog view
This commit is contained in:
parent
103c2749ce
commit
a416390622
Notes:
sideshowbarker
2024-07-19 12:53:07 +09:00
Author: https://github.com/awesomekling
Commit: a416390622
3 changed files with 9 additions and 2 deletions
|
@ -66,6 +66,8 @@ String ThreadCatalogModel::column_name(int column) const
|
|||
switch (column) {
|
||||
case Column::ThreadNumber:
|
||||
return "#";
|
||||
case Column::Subject:
|
||||
return "Subject";
|
||||
case Column::Text:
|
||||
return "Text";
|
||||
case Column::ReplyCount:
|
||||
|
@ -84,8 +86,10 @@ GModel::ColumnMetadata ThreadCatalogModel::column_metadata(int column) const
|
|||
switch (column) {
|
||||
case Column::ThreadNumber:
|
||||
return { 70, TextAlignment::CenterRight };
|
||||
case Column::Subject:
|
||||
return { 170, TextAlignment::CenterLeft };
|
||||
case Column::Text:
|
||||
return { 290, TextAlignment::CenterLeft };
|
||||
return { 270, TextAlignment::CenterLeft };
|
||||
case Column::ReplyCount:
|
||||
return { 45, TextAlignment::CenterRight };
|
||||
case Column::ImageCount:
|
||||
|
@ -104,6 +108,8 @@ GVariant ThreadCatalogModel::data(const GModelIndex& index, Role role) const
|
|||
switch (index.column()) {
|
||||
case Column::ThreadNumber:
|
||||
return thread.get("no").to_u32();
|
||||
case Column::Subject:
|
||||
return thread.get("sub").to_string();
|
||||
case Column::Text:
|
||||
return thread.get("com").to_string();
|
||||
case Column::ReplyCount:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue