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

Last character in clock is missing #20

Closed
ghost opened this issue Mar 1, 2017 · 6 comments
Closed

Last character in clock is missing #20

ghost opened this issue Mar 1, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Mar 1, 2017

screenshot_2017-03-01_13-27-57

When Atom is launched, clock doesn't display last character. If I go to settings and change format, it goes normal for a while but goes back to missing last character.

Atom: 1.15.4 x64
Electron: 1.3.13
OS: XUbuntu 16.04
Thrown From: atom-clock package 0.1.5

@b3by
Copy link
Owner

b3by commented Mar 1, 2017

Thank you for the issue. I will look into it as soon as possible, maybe trying to replicate it.
May I ask you which packages are currently active in your environment? I'm guessing it might depend on some external package that somehow interacts with the status bar.

@eduncan911
Copy link

eduncan911 commented Mar 1, 2017

FYI, I have been noticing this too over the last few days.

OS: macOS 10.12.3
Atom: 1.14.4 x64
atom-clock: 0.1.5

screen shot 2017-03-01 at 9 10 41 am

Note that it occurs regardless of what file, plugin or additional "status bar" items. If I start with a blank editor, it is still truncated:

screen shot 2017-03-01 at 9 13 14 am

I do have a custom Time Format in the settings: MM/DD h:mma But this does not matter. If I remove the custom Time Format and restart Atom, it is still truncating the "time":

screen shot 2017-03-01 at 9 14 59 am

--

I've noticed a few things that temporarily fixes it for the session that Atom is running:

  • Disable/Enable the plugin.
  • Remove/Add or Tweak the "Time Format" settings to anything.

Doing either of these immediately fixes the SPAN or DIV issue that is occurring.

--

You can "scroll" left to right the statusbar in this area.

--

Lastly, I do use a custom Font with custom editor stylesheets. Since Atom 1.13 (aka "Deprecation Hell" upgrade), a lot of styles had to be changed.

I'm wondering if the way the statusbar is calculating the width is now different - so when you go and populate the div/span, it isn't resized accordingly.

--

UPDATE: I disabled my Battery plugin as you see in the screenshots, and it had no effect - it still cuts off the clock.

@b3by
Copy link
Owner

b3by commented Mar 1, 2017

Thanks for the detailed showcase of the bug.
In the latest release of the clock, I just changed the way the packages displays the clock in the bar, because the div containing the time moves slightly if also seconds are displayed. Right now, I recalculate the width of the clock content every time the format changes, then I add some extra pixels for safety and I keep it fixed. I'm wondering, probably something is wrong when the package initializes and calculates the size for the first time.

I'll look into the issue ASAP, thank you again for letting me know!

@b3by
Copy link
Owner

b3by commented Mar 5, 2017

I was able to reproduce the bug in some situations where the developer console is placed to the right side of the screen. I applied a relative position to the container, now it seems to work properly (at least, I was not able to reproduce the bug any longer). I will update the package version, hoping that's it!

@b3by b3by closed this as completed in 174f78a Mar 5, 2017
@eduncan911
Copy link

eduncan911 commented Mar 5, 2017

@b3by it works! 👍

Though, the vertical alignment is a tad off. 🥇

So.. close...!

screen shot 2017-03-05 at 1 44 59 pm

I also removed my MM/DD h:mma formatting and tried to use the defaults. Same alignment issue:

screen shot 2017-03-05 at 1 42 37 pm

@b3by
Copy link
Owner

b3by commented Mar 5, 2017

Oh no!
I aligned the clock in the vertical middle, just like the other tiles out of the box, because on my system it was vertically off, just a bit.
I'm thinking, this might depend to the font you're using. I could get the vertical size of the status bar and place the clock right in the middle... oh, this is just for positioning a tiny text cell :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants