cppit / jucipp

A lightweight & cross-platform IDE supporting the most recent C++ standards. This project has moved to https://gitlab.com/cppit/jucipp.
https://gitlab.com/cppit/jucipp
MIT License
883 stars 98 forks source link

Close button for toolbars #256

Open MonJamp opened 8 years ago

MonJamp commented 8 years ago

I think it would make sense for the toolbars to have close buttons. I tried to implement it on my own but I wasn't sure how to make the button appear last without making it a toggle: Close_Button

eidheim commented 8 years ago

Many editors do not have close buttons for such entries (vim, emacs, atom to name a few), but instead relies on some key to close, like escape. Not sure if I have a preference, on the one hand it might be helpful for new users maybe, but such buttons would take up extra space, which might be a problem on smaller screens/windows.

The EntryBox class automates the placements of the various elements. Although it can be relatively easy to use, it might be too strict and not as general as it maybe should be. If we decide to add a close button, however, it can be added in the EntryBox class directly and thus be the same for all the various entry actions we have.

MonJamp commented 8 years ago

I can understand that train of thought. I don't really care much for a close button, but I was curious as to why it wasn't implemented.

ingmarlehmann commented 7 years ago

I absolutely think that being able to close toolbars is important. More so for small screens like 13 inch laptops. Qt creator has the very nice behavior of closing terminal window if not in an autocomplete and pressing escape. If in autocomplete it requires 2x escape, one to close completion and another to close terminal. The terminal then re-appears when anything sends output to it, like a build.

eidheim commented 7 years ago

@ingmarlehmann Not sure if escape should hide the terminal window, but the general idea is good I think. We could add a couple more Window menu items; toggle terminal and toggle directories. And when the terminal is hidden, it should automatically show if messages are printed to it through Terminal::print. PR's are welcome in this regard:)

edit: not sure about the default keybindings on these two menu items, maybe default them to ""