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

Stay On Top #31

Closed
smaragdus opened this issue Apr 11, 2018 · 14 comments
Closed

Stay On Top #31

smaragdus opened this issue Apr 11, 2018 · 14 comments

Comments

@smaragdus
Copy link

@martinrotter

You may add new command - Stay On Top (or just On Top) in View menu (with shortcut key, CTRL+T is very common) which puts Textosaurus on top of all windows. This would be very useful especially when the user needs to drag snippets of text (from web browser, mail client, other text editor, etc) into Textosaurus. To use such functionality currently I need to resort to external tools (for example SmartSystemMenu). Of course native support for Stay On Top would be better and handier. I suppose this feature would not be hard to be implemented.

@martinrotter
Copy link
Owner

martinrotter commented Apr 17, 2018

Added to "View" menu, with bindable keyboard shortcut which defaults to Ctrl + T. Setting is persistent.

@martinrotter martinrotter added this to the 0.9.1 milestone Apr 17, 2018
@smaragdus
Copy link
Author

@martinrotter
Thanks.

@smaragdus
Copy link
Author

Problem- if I check Stay On Top when Textosaurus (version 0.9.0.0) is in maximized state and then I click Restore button in the title bar Textosaurus loses its minimized window state.

@martinrotter
Copy link
Owner

martinrotter commented Apr 18, 2018

minimized window state

You mean non-maximized window state, right?

@martinrotter martinrotter reopened this Apr 18, 2018
@martinrotter
Copy link
Owner

I did some tweaks, please test 744fa38 when its development build gets compiled.

@smaragdus
Copy link
Author

@martinrotter
Yes.
In fact it is meaningless to enable Stay On Top when Textosaurus is in maximized window state yet I did it and thus I discovered that it lost it previous non-maximized window state.

@martinrotter
Copy link
Owner

Yes, problem here is, that once I switch stay-on-top flag, then Qt (GUI library) automatically hides the window and DISCARDS its internal state (size/position). This is because of some low-level OS restrictions for top-level windows. So, I tried to add necessary logic by myself in latest commit. Test it pls, if you can.

@smaragdus
Copy link
Author

I did some tweaks, please test 744fa38 when its development build gets compiled.

OK, I will.

@smaragdus
Copy link
Author

What about Stay On Top disabled when Textosaurus is in maximized state?
I can't imagine any use for Stay On Top when program is in maximized state.

@martinrotter
Copy link
Owner

Well, if Textosaurus main window is maximized that does not mean that you cannot mave any windows in front of it. If someone wants to drag some texts into textosaurus main window, it does not matter that window is maximized or not. I would rather fix the behavior, which was indeed broken. Test, and we will see.

@smaragdus
Copy link
Author

Version textosaurus-0.9.1-43d5130-win64 seems to resolve the problem with losing window state if Stay On Top was enabled in maximized window state. However switching to Stay On Top is not very smooth- the window flickers a bit.

@martinrotter
Copy link
Owner

Stay On Top is not very smooth- the window flickers a bit.

Yes, this is inevitable consequence of Qt implementation of "stay-on-top" flag. Nothing much better can be done. I could think about this.

@smaragdus
Copy link
Author

smaragdus commented Apr 18, 2018

Yes, this is inevitable consequence of Qt implementation of "stay-on-top" flag. Nothing much better can be done. I could think about this.

This is not a great problem.

You may release new fixed stable textosaurus version because this issue and the tray one (#13 ) were rather unpleasant.

@martinrotter
Copy link
Owner

Yes, I will release today.

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

No branches or pull requests

2 participants