Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to customize main window title #1583

Closed
EugeneZelenko opened this issue Jan 4, 2024 · 3 comments · Fixed by #1587
Closed

Add possibility to customize main window title #1583

EugeneZelenko opened this issue Jan 4, 2024 · 3 comments · Fixed by #1587
Assignees
Milestone

Comments

@EugeneZelenko
Copy link
Contributor

Hi, Matthias!

It'll be great to have possibility to customize main window title using command line option or environment variable. Motivation for this feature came from application that uses KLayout as viewer and could launch multiple KLayout sessions, so it's hard to distinguish between different applications in task bar.

@klayoutmatthias
Copy link
Collaborator

I'd propose a new attribute of the MainWindow class which allows configuring the window title.

Currently, you can configure the layout view names differently by using something like:

pya.LayoutView.current().title = "ABC"

this will show up in the main window title like this:

image

So that is a way to customize at least the back part of the title.

Matthias

@EugeneZelenko
Copy link
Contributor Author

Hi, Matthias!

Sure, this will work! Title could be set in startup script (-rm) or synchronized in more complex scenarios like socket/pipe monitoring.

klayoutmatthias pushed a commit that referenced this issue Jan 5, 2024
- new attribute "title" for MainWindow to get and set title
  (includes extrapolation to add dynamic content)
- also added LayoutView#is_dirty for emulation of the
  standard behavior
- plus side effect: LayoutView#synchronous is now readable
@klayoutmatthias klayoutmatthias self-assigned this Jan 5, 2024
@klayoutmatthias klayoutmatthias added this to the 0.29 milestone Jan 5, 2024
klayoutmatthias added a commit that referenced this issue Jan 6, 2024
Implemented solution for issue #1583
@klayoutmatthias klayoutmatthias linked a pull request Mar 29, 2024 that will close this issue
@EugeneZelenko
Copy link
Contributor Author

Hi, Matthias!

Thank you for enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants