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

Minimap should never overlap text in open buffer in absolute mode #344

Closed
mnquintana opened this issue Jun 11, 2015 · 8 comments
Closed

Comments

@mnquintana
Copy link

I'm loving the new absolute mode, but when I originally submitted #337, I had been thinking the minimap would have an opaque background, so:
screenshot 2015-06-11 07 23 53

Instead of:
screenshot 2015-06-11 07 22 25

That said, I'm not terribly opposed to the current styling, but it is kinda hard to read text behind the minimap, and I could see it being worse with other syntax themes.

@abe33
Copy link
Contributor

abe33 commented Jun 11, 2015

Make sense, I'll see how I can do that. Ideally you want to only have an opaque background behind the rendered lines and not the full minimap, which mean I'll have to make some additional draw, the worst would be to make the whole minimap opaque as it would hide end of lines even when the minimap's content doesn't occupy the full height.
That make me think that I probably should find a way to expand the the text-editor width when in absolute mode, because you won't be able to scroll all the way to the right as the minimap will always overlay the end of line. If you have any suggestions on how to achieve such a thing without breaking how the editor behave? I'm not sure about using some right padding.

@mnquintana
Copy link
Author

I think it would probably be easier to adjust the height of the minimap in absolute mode to fit the canvas height. Might have to write a function for that though – I'm not sure if it's possible with pure CSS?

@polarathene
Copy link

@abe33 Would like to see this enhancement, having a setting to configure a background fill colour/opacity for the minimap would be useful too when not in absolute mode. The theme I'm using has no distinction between the editor background and where the minimap area begins, when not in absolute mode text just disappears and it may not always be evident that it continues unless I notice the small horizontal scroll bar. Alternatively a border/separator line would help.

@fundon
Copy link
Member

fundon commented Dec 17, 2015

If you want that you can use custom the background-color of minimap.

https://github.com/atom-minimap/minimap#changing-the-minimaps-background

atom-text-editor atom-text-editor-minimap,
atom-text-editor::shadow atom-text-editor-minimap {
  background: rgb(40, 44, 52);
}

@fundon
Copy link
Member

fundon commented Dec 21, 2015

Closed.

You can re-open it if the issue is still here.

@fundon fundon closed this as completed Dec 21, 2015
@mnquintana
Copy link
Author

Whoops, sorry @fundon – this suggestion changed a bit from my initial post. What I realized I was really asking for was to expand the text editor width in absolute mode to make it so the minimap never overlaps an open buffer. So just changing the background color manually doesn't really fit this use case. Would you mind reopening? 😄

@mnquintana mnquintana changed the title Consider using opaque background in absolute mode Minimap should never overlap text in open buffer in absolute mode Jan 3, 2016
@fundon fundon reopened this Jan 3, 2016
@e7d
Copy link

e7d commented Jan 6, 2016

I got myself in the same situation as @mnquintana.

I found a solution that suits for me, but only because i only use the "absolute mode. The idea is to add a "gutter" on the right, to let the "text-editor" breathe. I achieved it as following, editing the minimap.less file:

atom-text-editor::shadow, atom-text-editor, html {
  .scroll-view {
    margin-right: 10%;
  }
}

The margin is set to 10%, since it is the width set for the atom-text-editor-minimap tag.

The main issue is the margin will apply in both modes, absolute or not. It should only be there in absolute mode.
I could not achieve it, since the .absolute class is set on the atom-text-editor-minimap which is not a parent of the "text editor" tag I modified.

Without setting the `.absolute' class at an upper level, I don't see how to achieve the expected behaviour.

@tomByrer
Copy link

+1

@abe33 abe33 closed this as completed in 17e02f4 Apr 26, 2016
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

6 participants