fv0 / native-ui

macOS theme for the Atom code editor. Over 205k downloads.
https://atom.io/themes/native-ui
140 stars 23 forks source link

"White spot" on the bottom right corner? #92

Closed samleemc closed 6 years ago

samleemc commented 6 years ago
screen shot 2018-08-21 at 1 14 11 am

For some reason, there is a "white spot" on my bottom right corner of my atom editor after using the Native-UI theme with the Atom Dark Syntax.

Does anyone have any idea?

samleemc commented 6 years ago

Anyone please?? This is really annoying.

fv0 commented 6 years ago

Hi @samleemc, it would be good if you could one-by-one deactivate all packages you have installed to find the package messing with this. Maybe if you inspect the area with DevTools you can see what is causing this display error. This is the first time someone reported this, so I assume that this isn’t happening to others.

hanslivingstone commented 6 years ago

Hi @fv0, yeah I can confirm this is reproducible (although somewhat inconsistently).

Description

This is related to scroll bar hiding in macOS. If "Show scroll bars" is set to "always" then these spots will appear when the window and content are sized in a way that one of both scrollbars are not visible.

These spots are actually the scrollbar corner divs with class "scrollbar-corner".

How to reproduce

This is not always reproducible. While looking into this, sometimes everything will render correctly, although after a few tries I was able to get this to reproduce on two different Macs, both running the latest version of High Sierra and Atom.

  1. In the System Preferences' General Pane, set "Show scroll bars" to "Always".
  2. Start with clean Atom settings (delete the ~/.atom directory).
  3. Install the super sweet native-ui theme, and activate it.
  4. Open different tabs with different sizes, you should see these scrollbar corners render incorrectly when at least one scrollbar is not visible (horizontal or vertical).

*Updated this after investigating further.

hanslivingstone commented 6 years ago

Actually, this isn't specific to native-ui, the problem exists with the prepackaged Atom Light and Atom Dark themes as well. Seems to be a problem with how Atom renders the scrollbar-corners.

Attached a screenshot from a vanilla install, using the same steps above except with the Atom Lighttheme and Atom Dark syntax theme.

one_light_theme_with_one_dark_syntax_theme

The default One Light and One Dark themes don't exhibit this problem however. @fv0 What do you think about patterning the scrollbars off how those themes implement them?

Looks like they have special code here to handle the "always show scrollbars situation": https://github.com/atom/one-dark-ui/blob/200b6bf9188bfe990354f04b52102ff1a6d25131/styles/atom.less#L16

hanslivingstone commented 6 years ago

Just took a stab at this with PR #93.

fv0 commented 6 years ago

@hanslivingstone Thanks so much. I’ll have a look at what you did and test it! This is what I love about the Open Source community, build better together :-)

fv0 commented 6 years ago

Should be fixed with latest release.