Giter VIP home page Giter VIP logo

atom-hidpi's People

Contributors

cart avatar emberquill avatar osso avatar varemenos avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

raphael osso

atom-hidpi's Issues

Panel on Keybindings setting has broken!

Hello, thank you for the awesome package for hi dpi user like me! ๐Ÿ‘

Since I installed this package and setup to adjust my environment, seems Keybindings panel on setting view has broken like this (panel size is blown up):

image 006

Used setting (only changed options, other options are just a default):

  • Operating System Scale Factor: 1.5
  • Reopen Current File: [checked]

Also I'm using MacBook Pro Retina 15-inch with BootCamp Windows 10. In order to solve os dpi issues, I have reduced resolution size to 1920x1200 and Zoom ui scale to 125%.

Is this expected or something bad?

Uncaught SyntaxError: Unexpected token u

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.210.0
System: Ubuntu 15.04
Thrown From: hidpi package, v0.6.0

Stack Trace

Uncaught SyntaxError: Unexpected token u

At file:///opt/atom/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fhome%2Fpeayala%2Fscansafe%2Fauthentication-service%22%7D%5D%2C%22bootstrapScript%22%3A%22%2Fopt%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fopt%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22includeDeprecatedAPIs%22%3Afalse%2C%22appVersion%22%3A%220.210.0%22%2C%22initialPaths%22%3A%5B%22%2Fhome%2Fpeayala%2Fscansafe%2Fauthentication-service%22%5D%7D:1

SyntaxError: Unexpected token u
    at Object.parse (native)
    at Hidpi.update (/home/peayala/.atom/packages/hidpi/lib/hidpi.coffee:85:32)

Commands

     -0:18 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-seti-ui)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "hidpi"
    ],
    "autoHideMenuBar": true
  },
  "hidpi": {}
}

Installed Packages

# User
angularjs, v0.3.0
git-tab-status, v1.9.2
jshint, v1.3.7
language-diff, v0.3.0
open-recent, v2.2.4
seti-ui, v0.7.1
travis-ci-status, v0.15.1

# Dev
No dev packages

font rendering is strange

I have standard 1920x1080 20" display and since Atom by default looks "small" on this setup, I tried to used your pkg to scale it up (instead of searching for tons of css selectors for each Atom's UI component and pasting it in own css). The problem is with main editor's pane (the one source code is presented in) - when I scale the font via css (or via Ctrl-+), it's sharp. When I scale it via your atom-hidpi (by e.g. setting default scale factor = 1.25) it's objectively less sharp.

Also - I'm on Windows 10 and using Atom 1.6. In both cases (with hdpi enabled/disabled), when I take screenshot of the app's window and magnify it (in e.g. standard Windows' painting app = nearest neighbour scaling), it's pretty obvious part of the editor's pane is antialiased using subpixel rendering while part is NOT antialiased this way! It's pretty clearly visible here http://imgur.com/8EDdag5
Yet the font rendering is more blurry with hidpi enabled.

Failed to activate the hidpi package

[Enter steps to reproduce below:]

  1. Upgraded from Atom 1.7.3 to Atom 1.7.4 using Fedora Copr package.
  2. When opening Atom for the first time after that, I received the error.

Atom Version: 1.7.4
System: "Fedora release
Thrown From: hidpi package, v0.11.0

Stack Trace

Failed to activate the hidpi package

At Cannot find module 'web-frame'

Error: Cannot find module 'web-frame'
    at Module._resolveFilename (module.js:438:15)
    at Module._resolveFilename (/usr/lib64/electron/resources/electron.asar/common/reset-search-paths.js:47:12)
    at Function.Module._resolveFilename (/usr/lib64/atom/src/module-cache.js:389:52)
    at Function.Module._load (module.js:386:25)
    at Object.<anonymous> (/home/razican/.atom/packages/hidpi/lib/hidpi.coffee:2:12)
    at Object.<anonymous> (/home/razican/.atom/packages/hidpi/lib/hidpi.coffee:1:1)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Package.module.exports.Package.requireMainModule (/usr/lib64/atom/src/package.js:715:27)
    at Package.module.exports.Package.activateNow (/usr/lib64/atom/src/package.js:173:16)
    at /usr/lib64/atom/src/package.js:156:32
    at Package.module.exports.Package.measure (/usr/lib64/atom/src/package.js:92:15)
    at /usr/lib64/atom/src/package.js:149:26
    at Package.module.exports.Package.activate (/usr/lib64/atom/src/package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/lib64/atom/src/package-manager.js:530:21)
    at /usr/lib64/atom/src/package-manager.js:511:29
    at Config.module.exports.Config.transactAsync (/usr/lib64/atom/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/usr/lib64/atom/src/package-manager.js:506:19)
    at PackageManager.module.exports.PackageManager.activate (/usr/lib64/atom/src/package-manager.js:489:46)
    at /usr/lib64/atom/src/atom-environment.js:754:28

Config

{
  "core": {
    "autoHideMenuBar": true,
    "projectHome": "/home/razican/workspace"
  },
  "hidpi": {}
}

Installed Packages

# User
hidpi, v0.11.0
language-rust, v0.4.6
language-x86asm, v0.8.0
linter, v1.11.4
linter-rust, v0.4.6

# Dev
No dev packages

Fix rendering errors after a scale factor change without reopening the current file

When a scale occurs, the cursor is rendered at the wrong position in the current file. This can be fixed by reopening the current file however it is visually unpleasant, it shows a prompt to save the current file if there are unsaved changes, and could result in data loss if the user accidentally chooses to discard the unsaved changes. atom-hidpi has the option to reload the current file when the scale factor changes, but it is disabled by default to prevent data loss.

It would be nice to find a fix that does not involve reopening the current file.

Broken with 1.2.1

Since I've upgraded to Atom 1.2.1 the package doesn't seem to change the scale factor anymore (stays too big). I'm on Linux if that makes a difference, happy to provide more information if needed.

Secondary monitor size being misread

Wish we had a way to debug what monitor size numbers atom-hidpi was seeing. I can't seem to make it respond to monitor changes. Yes update on resize is on.

If I set the cutoff to 3840x2160, it will set the ratio to 1x on both monitors.
If I set the cutoff to 3839x2159, it will set the ratio to 2x on both monitors.
Setting cutoff's to over 9000, sets to def ratio. Setting manual to "3840x2160":2 will set 2 on all monitors.
It's as if the 1440x900 monitor was being read as 3840x2160.

Aside from those settings, I've only changed "Operating System Scaling factor" to 2 as my atom does respond to gnomes scaling_factor.

Temporary solution in Fedora 23:

~/.local/share/applications/Atom-Hack.desktop 

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Atom HiDPI
Comment=Atom with HiDPI hack
Exec=/usr/bin/atom --high-dpi-support=1 --force-device-scale-factor=1
Icon=/usr/share/icons/hicolor/1024x1024/apps/atom.png
Terminal=false

Menu bar

Is there any way to fix the menu bar so that the font matches the rest of the scaling and doesn't get cut off at the bottom? It might also need padding.

Ubuntu 14.04
Gnome 3.16
Atom 1.0.11
Screen resolution 3200 x 1800

screenshot from 2015-09-02 22-09-16

HiDPI causes unsaved changes to be lost on window resize

Using Atom 0.207.0 and higher at least, on linux.

How to reproduce:

With the hidpi plugin enabled, I open a file and type some edits into it. (In my case, I'm editing js / html files) Then resize the window.

Expected result: Bigger window, same files open exactly as before.

Actual result: Bigger window, same files open, but all unsaved changes are gone.

Atom seems to be respecting the scale factor provided by KDE

I'm on KDE Plasma 5.8 on Debian Sid. KDE is already forcing a scale factor of 1.5. Previously (when I first dabbled in using Atom) a year ago, it didn't respect KDE's scale factor and its window would be rather tiny on my screen. I installed atom-hidpi and that set my scale factor to 1.5, it looked great but I soon forgot about Atom and went back to using Kate.

This week I started playing with Atom again (1.13.1). I've noticed that regardless of if the atom-hidpi package is installed or not, Atom maintains a pretty good scale factor (text isn't small, isn't big, is readabile). Forcing a larger or smaller scale factor on atom-hidpi has no effect for me. This leads me to believe that...

  1. Something has changed with Atom where it respects KDE's scale factor
  2. When Atom itself is dealing with scaling, atom-hidpi can't function.

If that is the case, there's another issue related to screen scaling I should file against Atom itself.

cutoff width config isn't enough to determine HiDPI

I have a HiDPI laptop whose native resolution is 2560x1700, and is normally set to 1280x850. I also have a 27" monitor whose resolution is 2560x1440.

There isn't a way to configure this package such that it scales only on my actual HiDPI display (the laptop); if I set it to 2560 (or the default 2300) it scales to 2x also on my 1440p display, since they're the same width.

Is there any way to access the system's current resolution setting, vs. the native resolution? If so, I wonder if this plugin could just sort of "auto-configure" based on the ratio between the two (native resolution / resolution setting >= 2). Or at least provide a second field.

Otherwise, very useful plugin - thanks for publishing it!

Failed to load the hidpi package

[Enter steps to reproduce below:]
Just trying to install hidpi package on an Arch Linux system.

Atom Version: 1.10.2
Electron Version: 1.3.5
System: linux 4.7.2-1-ARCH
Thrown From: hidpi package, v0.11.0

Stack Trace

Failed to load the hidpi package

At Cannot find module 'web-frame'

Error: Cannot find module 'web-frame'
  at Module._resolveFilename (module.js:440:15)
  at Module._resolveFilename (/usr/lib/electron/resources/electron.asar/common/reset-search-paths.js:35:12)
  at Function.Module._resolveFilename (/usr/lib/atom/src/module-cache.js:383:52)
  at Function.Module._load (module.js:388:25)
  at Object.<anonymous> (/home/shinsters/.atom/packages/hidpi/lib/hidpi.coffee:2:12)
  at Object.<anonymous> (/home/shinsters/.atom/packages/hidpi/lib/hidpi.coffee:1:1)
  at Module.load (module.js:458:32)
  at tryModuleLoad (module.js:417:12)
  at Function.Module._load (module.js:409:3)
  at Package.module.exports.Package.requireMainModule (/usr/lib/atom/src/package.js:718:27)
  at /usr/lib/atom/src/package.js:117:28
  at Package.module.exports.Package.measure (/usr/lib/atom/src/package.js:92:15)
  at Package.module.exports.Package.load (/usr/lib/atom/src/package.js:106:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/usr/lib/atom/src/package-manager.js:449:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/usr/lib/atom/src/package-manager.js:528:30)
  at /usr/lib/atom/node_modules/settings-view/lib/package-manager.js:460:29
  at exit (/usr/lib/atom/node_modules/settings-view/lib/package-manager.js:73:16)
  at triggerExitCallback (/usr/lib/atom/src/buffered-process.js:215:47)
  at /usr/lib/atom/src/buffered-process.js:229:18
  at Socket.<anonymous> (/usr/lib/atom/src/buffered-process.js:100:18)
  at emitOne (events.js:101:20)
  at Socket.emit (events.js:188:7)
  at Pipe._handle.close [as _onclose] (net.js:492:12)

Commands

     -3:26.5.0 application:add-project-folder (atom-pane.pane.active)
     -1:31 settings-view:open (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -1:27.7.0 key-binding-resolver:toggle (atom-pane.pane.active)
     -1:27.3.0 settings-view:open (atom-pane.pane.active)
     -1:18.8.0 core:cut (atom-text-editor.editor.mini.is-focused)
     -1:16.2.0 core:paste (atom-text-editor.editor.mini.is-focused)
  2x -1:15.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:08.5.0 core:paste (atom-text-editor.editor.mini.is-focused)
     -0:08.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{}

Installed Packages

# User
hidpi, v0.11.0 (inactive)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

Uncaught SyntaxError: Unexpected number

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.0
System: Ubuntu 14.04.2
Thrown From: hidpi package, v0.6.0

Stack Trace

Uncaught SyntaxError: Unexpected number

At file:///usr/share/atom/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2Fhome%2Fprenav_4%2Fsbox%2Ffred-msgs%22%7D%5D%2C%22bootstrapScript%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2Fusr%2Fshare%2Fatom%2Fresources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.0%22%2C%22shellLoadTime%22%3A261%2C%22initialPaths%22%3A%5B%22%2Fhome%2Fprenav_4%2Fsbox%2Ffred-msgs%22%5D%7D:1

SyntaxError: Unexpected number
    at Object.parse (native)
    at Hidpi.update (/home/prenav_4/.atom/packages/hidpi/lib/hidpi.coffee:85:32)

Commands

Config

{
  "hidpi": {
    "manualResolutionScaleFactors": "0.8"
  }
}

Installed Packages

# User
hidpi, v0.6.0
pigments, v0.8.0

# Dev
No dev packages

Please add an example of how to write the config

Would you please like to add an example configuration? I am "just using" atom, ran into this scaling issue but can not get any of the settings to do anything. It would be nice to see an original example config for this module so I can better understand if I just get the config syntax wrong, thanks!

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.