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

why is qterminal so small ? #492

Closed
shirishag75 opened this issue Oct 13, 2018 · 29 comments · Fixed by #606
Closed

why is qterminal so small ? #492

shirishag75 opened this issue Oct 13, 2018 · 29 comments · Fixed by #606

Comments

@shirishag75
Copy link

shirishag75 commented Oct 13, 2018

See the following -

qterminal-height-weight-settings

and

qterminal-so-small-of-total-desktop-area

for some reason by default the window is pretty small, even when I have asked it to use 100% width.

FWIW, my system supports and uses 1600x900 screen so it's wide-screen.

I did see that the size is hardcoded in qterminal.ini

/.config/qterminal.org$ cat qterminal.ini | grep 640
size=@Size(640 480)

I say hardcoded as I changed it, rebooted the system and saw that the same settings were in there as earlier.

The same I saw of keyboard shortcuts as well, changing any keyboard shortcuts in the .ini file has no effect and they go back to their default keybindings.

I have given most of the info. of system specific at #491

@agaida
Copy link
Member

agaida commented Oct 13, 2018

Dropdown settings only apply to the dropdown terminal, not to the normal terminal

Edit: I guess Settings > Behaviour "Save size when closing" is what you want - at least one time to set the size that fit for you.

@shirishag75
Copy link
Author

I did that, will know on next reboot whether it worked or not.

@agaida
Copy link
Member

agaida commented Oct 13, 2018

@shirishag75 - but the idea of intiial settings without saved size or positions sounds nice to me, not that i missed it much until now, but i guess some people would love it.

@tsujan tsujan self-assigned this Mar 9, 2019
@tsujan
Copy link
Member

tsujan commented Mar 9, 2019

but the idea of intiial settings without saved size or positions sounds nice to me

Found this issue by chance.

I did it a long time ago but not in a way usable for all. My reason was that I wanted an appropriate, fixed, initial size. pcmanfm-qt has such a setting (I don't remember if it was there or I added it); FeatherPad too.

If I find time, I'll add it. For now, I only self-assign.

@apjanke
Copy link
Contributor

apjanke commented Mar 12, 2019

Related: #284. Sounds like pretty much the same request.

@agaida, @shirishaG: Are you looking for a setting that will control the size of the window each time you launch qterminal or press Ctrl-N? Or just a setting that controls the size of the window the first time you run qterminal on a new machine or new desktop session?

@tsujan
Copy link
Member

tsujan commented Mar 12, 2019

@apjanke I've self-assigned but may not have time to do it soon. So, if you want to do it soon, please tell me and I'll remove the self-assignment -- 2 devs shouldn't work on the same thing.

@apjanke
Copy link
Contributor

apjanke commented Mar 12, 2019

Let's wait to hear back from agaida and shirishaG to confirm that this would work, but yeah, I'd like to give this a try later this week if this is what they're looking for.

Since there are already boolean prefs for "Save Size when closing" and "Save Position when Closing", this could probably be handled by just adding a new "Default window Size" pref that takes an (X, Y) size pair, and have it be used for new windows when "Save Size when closing" is off. The pref could be displayed right after "Save Size when closing" on the Behavior sheet; there's room there.

The (X, Y) size should be in characters, not pixels, right?

Question: When "Save Size when closing" is set, and you change the window size and close the window, should that change this saved "default size" pref? I'd say no.

So, this would take:

  • Adding a new pref in the Properties
  • Modifying QTerminal's window-opening code to respect it
  • Adding widgets to control the pref in PropertiesDialog
  • Adding an item for it in Properties::migrate_settings()
  • Add entries for it in the src/translations files

Right?

@shirishag75
Copy link
Author

The easiest and perhaps most straight-forward would be a way to set the window size the way I want and have it use that constantly. There are a whole mess of settings in ~/.config/qterminal.org/qterminal.ini which probably needs to be documented and exposed in some way so that the user can make use of it. But that is a different and perhaps a bit more larger issue.

I am not sure how the whole thing really works or even if changes in the .ini file does any change at all or the dimensions of the terminal are hard-coded somewhere else ?

There also needs to be a system of querying the terminal and know the size, dimensions etc. I dunno if that can be on the console or not currently.

@tsujan tsujan removed their assignment Mar 13, 2019
@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

but yeah, I'd like to give this a try later this week if this is what they're looking for.

Great! I removed self-assignment.

Don't forget that "Save size when closing" and the new option should be mutually exclusive -- and it's better to put them near each other, IMO.

EDIT: Oh, you've already considered that in your comment.

@apjanke
Copy link
Contributor

apjanke commented Mar 13, 2019

The easiest and perhaps most straight-forward would be a way to set the window size the way I want and have it use that constantly.

But how exactly do you want to set that size? Turn on "Save Size when closing", adjust the terminal window size to what you want, then close it, then go back into preferences and turn off "Save Size when closing", so that last saved size sticks around?

There are a whole mess of settings in ~/.config/qterminal.org/qterminal.ini which probably needs to be documented and exposed in some way so that the user can make use of it.

These are mostly controlled in the Preferences pane (⌘-, on Mac; some "preferences" or "options" menu item on other systems). The rest are just saved state based on what has happened in the last qterminal session. I dunno if this file is intended to be user-editable or not; I would suspect not.

There also needs to be a system of querying the terminal and know the size, dimensions etc. I dunno if that can be on the console or not currently.

Do you mean with escape sequences by the program running inside the terminal? Or querying the QTermWidget object via C++ calls? Or interprocess communication with the qterminal program somehow?

@apjanke
Copy link
Contributor

apjanke commented Mar 13, 2019

Great! I removed self-assignment.

Cool. I'm pretty busy with the day job the next couple days, but expect a PR from me this weekend.

Don't forget that "Save size when closing" and the new option should be mutually exclusive

Maybe it should be a radio button between "Save Size when closing" and "Default Size" instead of check box(es), to make the mutual exclusivity obvious?

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

Turn on "Save Size when closing", adjust the terminal window size to what you want, then close it, then go back into preferences and turn off "Save Size when closing", so that last saved size sticks around?

That's what I've done for myself (with a small change in the code) but I don't think it's good for all users.

I'd add two spin boxes like in featherpad:

fp

In featherpad, the whole row will be disabled if saving size on closing is checked.

That's just a suggestion.

EDIT: the symbol in the above screenshot is ×, not x (y, z).

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

And if you add spin-boxes, set their max. values to primary screen dimensions (please don't use QDesktopWidget for that -- it's obsolete).

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

There are a whole mess of settings in ~/.config/qterminal.org/qterminal.ini which probably needs to be documented

@shirishag75 Contents of config files are for apps, not for users. Some users may know the code, some others may guess meanings of keys but manual editing of a config file isn't a good practice in general.

Anyhow, documentation doesn't make sense for config files.

@agaida
Copy link
Member

agaida commented Mar 13, 2019

hmm - i should look into the history, there was a reason why we allowed so small sizes ...

And i would not put so much work into it - i should start a new debian live iso and take a snapshot.

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

And i would not put so much work into it

IMHO, it's a necessary feature. An unchangeable start size isn't something I could tolerate ;)

@agaida
Copy link
Member

agaida commented Mar 13, 2019

- direct from the start

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

More specifically, the start size of a config dialog, for example, can be fixed. But a text editor or a terminal emulator? Never! Saving size on quitting can't replace setting the start size -- they're 2 different options that should be provided by such apps. Strange that this subject was forgotten...

@agaida
Copy link
Member

agaida commented Mar 13, 2019

i have nothing against a fixed optional start size - the current behavior goes back to pvanek, with the logical argument: "I like it that way." - If we implement it, we should be careful.

A fixed start size contradicts saving the size at closing ...

@agaida
Copy link
Member

agaida commented Mar 13, 2019

So - the initial size is hard coded - but with save size on exit that wouldn't last long.

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

with the logical argument: "I like it that way."

Only Gnome devs make apps just as they "like" them ;) -- probably, as it's easier to them.

@agaida
Copy link
Member

agaida commented Mar 13, 2019

hihi - and i thought until now, that they just remove functionality that they don't like. So more developers on a project will result in far less functionality.

Edit: Please keep in mind that qterminal was one of pvaneks pet projects and became part of LXQt short time ago. So i guess it was really a good argument :D

@tsujan
Copy link
Member

tsujan commented Mar 13, 2019

Yes, I know that we owe debt of gratitude to pvanek. If it wasn't for his forking Konsole, we wouldn't have this nice app.

EDIT: I can't use Konsole even under KDE anymore ;)

@yan12125
Copy link
Member

The (X, Y) size should be in characters, not pixels, right?

This is a good idea!

tsujan added a commit that referenced this issue Aug 4, 2019
Closes #492

If the window size is not remembered on exiting, the custom width and height could be set in Preferences. Then, QTerminal will always have that size on starting. Of course, the maximized state is also saved/restored, as before.

Although the size is in pixels (not in characters), a button is added for getting the current size, so that the user could first resize QTerminal and then open Preferences and get the size. In this way, (1) lots of complex calculations are prevented, and (2) differences in tastes are respected.
@tsujan
Copy link
Member

tsujan commented Aug 4, 2019

OK, I waited enough ;) Implemented in #606 :

fixed_size

The new option is enabled only when "Save size when closing" is not checked.

@shirishag75
Copy link
Author

Thank you, What version of qterminal will I need to see this feature ?

@tsujan
Copy link
Member

tsujan commented Aug 5, 2019

What version of qterminal will I need to see this feature ?

It isn't merged yet but it should be in the next release.

@shirishag75
Copy link
Author

shirishag75 commented Aug 15, 2019

looking forward to that, thank you. Mark it fixed and released when you merge and push the new release.

@tsujan
Copy link
Member

tsujan commented Aug 15, 2019

You're welcome.

Mark it fixed and released when you merge and push the new release.

GitHub will close this issue as soon as the PR is merged.

agaida pushed a commit that referenced this issue Aug 18, 2019
Closes #492

If the window size is not remembered on exiting, the custom width and height could be set in Preferences. Then, QTerminal will always have that size on starting. Of course, the maximized state is also saved/restored, as before.

Although the size is in pixels (not in characters), a button is added for getting the current size, so that the user could first resize QTerminal and then open Preferences and get the size. In this way, (1) lots of complex calculations are prevented, and (2) differences in tastes are respected.
Andersbakken pushed a commit to Andersbakken/qterminal that referenced this issue Mar 13, 2020
Andersbakken pushed a commit to Andersbakken/qterminal that referenced this issue Mar 13, 2020
Closes lxqt#492

If the window size is not remembered on exiting, the custom width and height could be set in Preferences. Then, QTerminal will always have that size on starting. Of course, the maximized state is also saved/restored, as before.

Although the size is in pixels (not in characters), a button is added for getting the current size, so that the user could first resize QTerminal and then open Preferences and get the size. In this way, (1) lots of complex calculations are prevented, and (2) differences in tastes are respected.
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.

5 participants