Skip to content

app: presentation tweaks and improvements#25

Merged
Ramen2X merged 7 commits intomasterfrom
presentation-tweaks
Dec 9, 2025
Merged

app: presentation tweaks and improvements#25
Ramen2X merged 7 commits intomasterfrom
presentation-tweaks

Conversation

@Ramen2X
Copy link
Member

@Ramen2X Ramen2X commented Dec 13, 2024

This PR includes some general presentation tweaks and improvements:

  • Sets the global application title to "SI Editor" and reuses it for the window title (previously, only the window title was set to "SI Editor").
  • Appends the currently opened Interleaf file name to the window title.
  • Adds an asterisk indicator to the filename in the title if the file has pending unsaved changes.
  • Properly clears/initializes the screen when making a new file (previously, the media panel elements would remain).

@itsmattkc
Copy link
Collaborator

itsmattkc commented Dec 13, 2024

Good additions, though Qt has a more automated way of adding * to the title that's probably preferable:

Call setWindowTitle() with a [*] somewhere in the string, and then call setWindowModified() and Qt will automatically add/remove the asterisk. This is also useful because at some point we can check windowModified() to confirm/prevent closing an unsaved file.

@Ramen2X
Copy link
Member Author

Ramen2X commented Dec 13, 2024

On the topic of automating things with Qt, I just noticed that we don't necessarily have to manually handle trimming directories if we make use of QFileInfo and use its methods to get the clean filename, like it's used here:

v->SetSubtitle(QFileInfo(s).fileName());

This would probably be more "correct", but even if we were to do this, we'd still have to manually trim the embedded media paths to get the Object filenames in the SI for the extraction functionality. So unless there were some way to encapsulate those in a QFileInfo object as well, I wonder if keeping the custom function makes sense. We could also go back to inlining the trimming logic in the extraction function only, like it is in master.

@Ramen2X
Copy link
Member Author

Ramen2X commented Nov 24, 2025

@foxtacles Seeing as you've sorta taken over maintenance duties, is there any interest in me updating/fixing this PR and getting it merged or should I just close this?

@foxtacles
Copy link
Member

@foxtacles Seeing as you've sorta taken over maintenance duties, is there any interest in me updating/fixing this PR and getting it merged or should I just close this?

If you could update the PR that would be great - looks pretty much ready to merge to me!

@Ramen2X Ramen2X merged commit b2d30fd into master Dec 9, 2025
2 checks passed
@Ramen2X Ramen2X deleted the presentation-tweaks branch December 9, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants