Code Monkey home page Code Monkey logo

scrollbar-style's Introduction

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

Scrollbar Style Build Status

This package detects the preferred scroller style for Atom on OS X using the +preferredScrollerStyle method on NSScroller. For compatibility, this library always returns "legacy" on Windows and Linux.

const scrollbarStyle = require('scrollbar-style')

const style = scrollbarStyle.getPreferredScrollbarStyle()
console.log(style) // ==> 'legacy' or 'overlay'

scrollbarStyle.onDidChangePreferredScrollbarStyle((newStyle) => {
  console.log('style changed', newStyle)
})

scrollbar-style's People

Contributors

darangi avatar kevinsawicki avatar lkashef avatar sadick254 avatar thedaniel avatar zcbenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scrollbar-style's Issues

npm install vs node-gyp rebuild

I have another strange issue. First i need to add msvs_disabled_warnings 4244 (like #3).
and next if i run node-gyp rebuild its ok but npm install or npm build . break with error:

> [email protected] install c:\Portable\scrollbar-style
> node-gyp rebuild


c:\Portable\scrollbar-style>node "c:\Portable\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:998:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:34)
gyp ERR! System Windows_NT 6.0.6000
gyp ERR! command "node" "c:\\Portable\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Portable\scrollbar-style
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the scrollbar-style package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls scrollbar-style
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.0.6000
npm ERR! command "c:\\portable\\nodejs\\node.exe" "c:\\portable\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd c:\Portable\scrollbar-style
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\Portable\scrollbar-style\npm-debug.log
npm ERR! not ok code 0

Build error when building against Electron 7 on Linux

Prerequisites

Description

Compilation error:

../src/scrollbar-style-observer-non-mac.cc: In static member function ‘static void ScrollbarStyleObserver::Init(v8::Local<v8::Object>)’:
../src/scrollbar-style-observer-non-mac.cc:35:51: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, v8::Local<v8::Function>)’
     Nan::GetFunction(newTemplate).ToLocalChecked());
                                                   ^

See: https://dev.azure.com/DeeDeeG/b/_build/results?buildId=886&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=cccdf131-0893-5d7b-ccea-9ccfc8953f95&l=889

Steps to Reproduce

  1. Modify Atom master branch to depend on to depend on this package, version 3.2.2
  2. Modify Atom master branch to use Electron version 7.3.3
  3. On Linux, try to build Atom

Expected behavior:

Atom should build successfully

Actual behavior:

scrollbar-style fails to compile during Atom's bootstrap process

Reproduces how often:

100%

Versions

Info from (unaffected, succesfully built) macOS app:

% ~/atom/out/Atom\ Dev.app/Contents/MacOS/Atom\ Dev --version   
Atom    : 1.55.0-dev-689759bb5
Electron: 7.3.3
Chrome  : 78.0.3904.130
Node    : 12.8.1
% ~/atom/out/Atom\ Dev.app/Contents/Resources/app/apm/bin/apm --version
apm  2.5.2-atomic.3.1
npm  6.14.9
node 12.4.0 x64
atom 1.55.0-dev-689759bb5
python 2.7.16
git 2.27.0

Reproduced on OS: Ubuntu 16.04 (CI) and Ubuntu 20.04 (not CI)

Additional Information

Seems like there is a NAN issue that is triggered on non-mac OSes, perhaps just on Linux.

Error building on windows 7

Hi, I have this problem on windows 7:

c:\Portable\atom\node_modules\pathwatcher\node_modules\nan\nan.h(934): error C2220: warning treated as error - no 'objec
t' file generated [c:\Portable\atom\node_modules\pathwatcher\build\pathwatcher.vcxproj]
          c:\Portable\atom\node_modules\pathwatcher\node_modules\nan\nan.h(1127) : see reference to function template in
  stantiation 'size_t _nan_base64_decode<uint16_t>(char *,size_t,const TypeName *,const size_t)' being compiled
          with
          [
              TypeName=uint16_t
          ]

this mean that you have some warnings and compuler make warning from it.

Do You have some clue what is wrong?

error [email protected] install: `node-gyp rebuild` on Windows 8.1 pro (64-bit)

I can post my full npm-debug.log file, but I think these are the pertinent details:

206 error [email protected] install: `node-gyp rebuild`
206 error Exit status 1
207 error Failed at the [email protected] install script.
207 error This is most likely a problem with the scrollbar-style package,
207 error not with npm itself.
207 error Tell the author that this fails on your system:
207 error     node-gyp rebuild
207 error You can get their info via:
207 error     npm owner ls scrollbar-style
207 error There is likely additional logging output above.
208 error System Windows_NT 6.2.9200
209 error command "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "scrollbar-style"
210 error cwd D:\Sites\atom
211 error node -v v0.10.22
212 error npm -v 1.3.14
213 error code ELIFECYCLE
214 verbose exit [ 1, true ]

I'm building on Windows 8.1 pro (64-bit). At first this was installing as part of Atom.io, but then I tried a simple npm install scrollbar-style and got the same error.

Compilation errors when installing in sl-release-6.6-1.x86_64

From @acampove on October 24, 2015 13:19

Hi,

When following https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md for fedora/centos/Rhel I get a lot of error messages when running script/build. I am told at the end of the message that:

npm ERR! Please include the following file with any support request:
npm ERR! /home/acampove/Downloads/atom/npm-debug.log

I cant attach the file for some reason, but the lines at the end say:

10864 error node v0.10.40
10865 error npm v2.13.3
10866 error code ELIFECYCLE
10867 error [email protected] install: node-gyp rebuild
10867 error Exit status 1
10868 error Failed at the [email protected] install script 'node-gyp rebuild'.
10868 error This is most likely a problem with the scrollbar-style package,
10868 error not with npm itself.
10868 error Tell the author that this fails on your system:
10868 error node-gyp rebuild
10868 error You can get their info via:
10868 error npm owner ls scrollbar-style
10868 error There is likely additional logging output above.
10869 verbose exit [ 1, true ]

Any idea what might be the problem?

Thanks.

Copied from original issue: atom/atom#9275

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.