Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conversation

@VizuaaLOG
Copy link

Using the image on this trello post (https://trello.com/c/jhCb7dvV/909-windows-scroll-bars) i have made the scrollbars in windows prior to windows 8 look like the windows 8 scroll bars as requested.

@marcelgerber
Copy link
Contributor

They are also changed a little bit in Win8, the hover effect isn't there. I like the hover effect.
Also, the buttons for up/down (left/right) aren't there. It would be cool if the whole scrollbar looks like in Win8.

@VizuaaLOG
Copy link
Author

I will have a look into it when I finish college. Thanks for the feedback.

@VizuaaLOG
Copy link
Author

@SAplayer Do you have Windows 8? If you do is it possible if you could take a screenshot of the scroll bar in normal and hover state. Just i do not have windows 8. Thanks, would be much appreciated.

@marcelgerber
Copy link
Contributor

I have done it myself, in my opinion the scrollbar now looks pretty good (but it's not best!). I will send you a pr.

EDIT: VizuaaLOG/brackets#1, can you please merge it?

Better behaviour of the win scrollbars: Hover-effect, not running into ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, it doesn't work with :corner-present yet.

@VizuaaLOG
Copy link
Author

Thanks for the help it looks brilliant. Do you know if it looks the same on XP and Vista? It looks fine on windows 7

@marcelgerber
Copy link
Contributor

I can try it on Vista, but my old pc takes a lot of time to start, so I will maybe try it tomorrow (but Vista looks not much different as Win7). Let's let some others try it on XP.

And as I just commented, the :corner-present doesn't work for some reason, so the scrollbar doesn't reach the bottom to not run into an horizontal scrollbar which can be there (I think this is caused by CEF). It would be cool if that was running, too, because then the scrollbar could reach the button if that is possible (that would look much better).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this border that you can differentiate the scrollbar from the grey parts of the gui, for example the sidebar.

@VizuaaLOG
Copy link
Author

If i am correct you mean that if there is no horizontal scroll then the vertical should extend the full height. If this is correct, could it be done with javascript?

@marcelgerber
Copy link
Contributor

Yes, you're right (sorry if I express myself the wrong way, but I'm from germany :D). Currently it looks like this when there are both horizontal and vertical scrollbars:
image

But if there is only a vertical scrollbar:
image

This scrollbar should have no margin-bottom, but it has.

This maybe can be fixed within JavaScript, but that won't be a good soultion. I think this will be possible LESS/CSS-only at least when CEF is updated.

@VizuaaLOG
Copy link
Author

Yes, i understand what you mean. If they fix this when it is updated then i will look into patching the problem if it doesn't fix it automatically.

@marcelgerber
Copy link
Contributor

@VizuaaLOG I have just created a test site, with Chrome 30 it works just fine (the code is pretty much the same as in brackets itself). You mustn't even use the :corner-present, it only needs to have a ::-webkit-scrollbar-corner.
So on updating we only have to delete the lines that control the margin.

@VizuaaLOG
Copy link
Author

@SAplayer Looked at the demo you did and tried changing the code in brackets but the same effect with the horizontal scrollbar being underneath the vertical one. Will just have to wait for CEF to get updated. Thanks for trying it out in chrome though.

@marcelgerber
Copy link
Contributor

Yes, that is what I meant. But until this is fixed the current solution is good enough, I think.

@VizuaaLOG
Copy link
Author

Yes I think it looks brilliant. (Thanks to your help :) )

@JeffryBooher
Copy link
Contributor

Small problem with the dead-man's corner in the lower right edge of the editor (the square box where the two scrollbars would intersect)

image

@marcelgerber
Copy link
Contributor

This is what we described, please read the whole conversation. Maybe you know how to fix this.

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2013

Same issue that Jeff commented on but in the lower-left corner (i.e. shouldn't be a line number next to horizontal scrollbar) unless they're only shown on mouse-over.

@marcelgerber
Copy link
Contributor

@redmunds But isn't it the same behaviour on linux?

@JeffryBooher
Copy link
Contributor

@larz0 has the vertical scrollbar extended to the bottom working but, when there are both vertical and horizontal scrollbars, it looks kind of strange. Ultimately, though, it's what we want when there is just a vertical or horizontal scrollbar. The extended vertical scrollbar may be good enough but, typically, Windows apps just have dead space there. I suggested that we try an AP div with a white background but it may be too much trouble.

@SAplayer the issue you describe didn't illustrate that the text in the editor shows up in the "neutral-zone" (the corner where the 2 scrollbars would intersect) which is why I commented and illustrated that with a screen grab. If it were just white -- it would have been acceptable as-is but scrolling the document presented a drawing issue which is not acceptable so we must find a way to fix that before it can be merged.

Thanks for helping us out with this issue! Your contributions are helping make Brackets a great editor!

@marcelgerber
Copy link
Contributor

So the core problen is that we can't use ::-webkit-scrollbar-corner, which is exactly this corner.

@larz0
Copy link
Member

larz0 commented Oct 8, 2013

@SAplayer I'm trying to figure out why ::-webkit-scrollbar-corner won't work.

@redmunds any ideas?

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2013

@larz0 Not sure. Need to take a closer look.

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2013

CodeMirror already fixes the problems that @JeffryBooher and I describe using AP Divs -- take a look at CodeMirror-scrollbar-filler and CodeMirror-gutter-filler classes. So, shouldn't need any scrollbar-filler pseudo-elements.

@larz0
Copy link
Member

larz0 commented Oct 8, 2013

Schweet. Thanks @redmunds.

@marcelgerber
Copy link
Contributor

@redmunds Seems this is already used since #3756, but it doesn't work. (seems this doesn't work with webkit scrollbars?) I just tested out the linux scrollbars, you can see these gutters too, but it's not that important (what about using them scrollbars also for win? They are not looking this bad, maybe we can also add a hover effect.)

@VizuaaLOG
Copy link
Author

I have just posted a new commit which adds the class to place the filler in the corner i have also made it the same colour as the scrollbars. However, i'm not sure how to put it there if both scrollbars are visible and not if there is only one.

@marcelgerber
Copy link
Contributor

I for myself don't see the scrollbar-filler at all...

@redmunds
Copy link
Contributor

Watch the word-wrap on my previous comment. The class names are CodeMirror-scrollbar-filler and CodeMirror-gutter-filler. They're already defined in CodeMirror and overridden in brackets_codemirror_override.less. CodeMirror controls when they are hidden and shown. It would be nice if these scrollbars fit into the CodeMirror model, but otherwise you may need to hide/show these elements yourself.

@marcelgerber
Copy link
Contributor

But also with .CodeMirror-scrollbar-filler it won't work. I saw the code in the Developer Tools, but they were width: 0px; height: 0px;, also in a file with both horizontal and vertical scrollbars (in my case FindReplace.js). And there is also the problem that the scrollbar isn't reaching the bottom is there is only one scrollbar.

I think we will need some javascript...

@VizuaaLOG
Copy link
Author

@SAplayer i have been trying to think of how i could do it with javascript but it needs to be checked periodically because onload it might not be enough for a scrollbar but when they have typed a few lines it then needs it. The only way i could think of doing this was with setTimeout() but i think this would cause performance problems.

@redmunds
Copy link
Contributor

This looks pretty cool on Win7, except that the arrow buttons at top and bottom of scrollbar are missing. Is that by design?

Unfortunately, I don't have a Win8 machine to look at that bug.

@marcelgerber
Copy link
Contributor

This is normally included in Win8, but we would need pictures of arrows to include them (4 directions; 2 states (hovered or not); 4 * 2 = 8 pics).

@marcelgerber
Copy link
Contributor

If you want to, I can take screenshots both of the normal Brackets look in Win8 and the current implementation of these scrollbars and share them with you tomorrow, so that we can compare them.

@redmunds
Copy link
Contributor

@larz0 Can you provide some arrow icons?
@SAplayer do you need a particular size or format?

@larz0
Copy link
Member

larz0 commented Oct 10, 2013

@SAplayer @redmunds here are the scrollbar arrows http://cl.ly/image/1K3c2j3j1307

@marcelgerber
Copy link
Contributor

Here are the screens:
Default Windows 8 style:

  1. Both horizontal and vertical scrollbars
    image
  2. Only vertical scrollbar
    image

Style from this PR

  1. Both horizontal and vertical scrollbars
    image
  2. Only vertical scrollbar
    image

@TomMalbran
Copy link
Contributor

I guess we can close this PR now that #6305 was merged.

@peterflynn
Copy link
Member

Agreed -- closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants