code icon indicating copy to clipboard operation
code copied to clipboard

Make header bar more adaptive, e.g. for small screens and tiling

Open jeremypw opened this issue 4 years ago • 5 comments

Problem

With a screen size of 1366 x 768px Code cannot be half-tiled because there are too many widgets in the headbar. This makes it difficult to view two document at once. (See issue #1080)

It is noted that Code will half-tile at this size when no documents are open because the headerbar does not then contain the Tab, Syntax Highlighting and Line Number tools.

Proposal

The Tab and Syntax Highlighting tools are not in continuous use so could be moved into the AppMenu to save space. Alternative some other solution to make the required width smaller could be used. This could happen at all screen/window sizes (easier) or just when Code detects it is running in a small screen/window.

Prior Art

Geany moves some tools out of the tool bar and into a menu when the window does not have sufficient width so will half-tile at 1366px screen width.

jeremypw avatar Jul 19 '21 08:07 jeremypw

I agree making the headerbar more adaptive for smaller screens and tiling is something we should pursue. That could mean moving indentation and syntax highlighting to the app menu as proposed here, or it could be accomplished differently; as such, I'm going to rename this issue to be more specifically about the problem we're trying to solve.

cassidyjames avatar Jul 19 '21 15:07 cassidyjames

Seconded. The "no project selected" field also takes up a lot of space and keeps me from resizing the window any smaller. This is a little annoying as I often have a browser taking up about 75% of the screen and a text editor with notes in the other.

nevillepark avatar Aug 19 '21 20:08 nevillepark

I think Code is really now intended to a be a "main" app on screen intended for code development rather than a simple text editor. Maybe we should provide a minimalist text editor as well? It is difficult for an app to try and fulfil two roles. A solution may be to hide the project selector when the sidebar is hidden? If you are just taking notes then you do not really need all the code development stuff.

jeremypw avatar Aug 20 '21 18:08 jeremypw

That would be a great solution!

I also agree that elementary needs a basic Notepad-like text editor. I've been looking around and this one, Eddit, is pretty much exactly what I had in mind. Could it be forked? Some minor things to fix/add:

  • line soft-wrapping doesn't work (will make an issue for it)
  • could add auto-saving and restoring files on startup, to be in line with how Code acts
  • could add support for tabs and a sepia colour scheme, similar to Terminal

But otherwise it's fine.

nevillepark avatar Aug 20 '21 22:08 nevillepark

With the new update that hides the project field unless you have the sidebar open, the Code window is more compact!

I would still like it if the Tab/Syntax Highlighting/Line Number buttons could shrink down or collapse into the AppMenu, but as it is this is a very nice improvement.

nevillepark avatar Oct 04 '21 22:10 nevillepark

Reopening because we're just a few pixels short of half tiling on 1366

danirabbit avatar Jan 13 '23 22:01 danirabbit