8000 Windows 10 clock layout with notification button at right side · Issue #39 · White-Tiger/T-Clock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Windows 10 clock layout with notification button at right side #39

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

Closed
ygoe opened this issue Jun 22, 2016 · 19 comments
Closed

Windows 10 clock layout with notification button at right side #39

ygoe opened this issue Jun 22, 2016 · 19 comments

Comments

@ygoe
Copy link
ygoe commented Jun 22, 2016

Windows 10 will release an update by the end of July that moves the notification button from the left side of the clock to its right side. Most users should receive this update automatically within a few days or weeks. T-Clock does not properly handle that if the clock text is longer than the system clock's text.

This is how the clock looks by default:
t-clock-win10notification-plain

This is T-Clock with a format that doesn't fit into that space:
t-clock-win10notification

Even when T-Clock is closed, it doesn't restore the original layout. A logoff and re-logon is required to get the first screenshot again. Here the mouse is hovered the system clock to highlight its dimensions.
t-clock-win10notification-exit

As I'm writing this, Windows kindly provided some "advertisements" so I can also show how the notification button looks like with active items:
t-clock-win10notification2 vs. t-clock-win10notification4

As the time format gets longer, the notification button is completely covered. Even longer formats will be clipped:
t-clock-win10notification3

@White-Tiger
Copy link
Owner

that sounds like Microsoft did at least change the resizing behavior present since Win 95 (otherwise, it should still extend to the left)
If that mechanic is really gone, and wasn't replaced by something else, it might be quite hard (and hacky) to get it working again... in which case it's unclear if I'll get it working again. (without glitches)

Though, I'll wait for the release first as things might change before that.

@B00ze64
Copy link
B00ze64 commented Jun 24, 2016

There they go again with their ridiculous changes to the system tray (remember the scrolling arrows, limiting the tray to like 4 icons wide?). It looks like crap and screws-up TClock; thank you Microsoft for changing something that has worked on desktop for 20 years and making it into a phone O/S...

@ygoe
Copy link
Author
ygoe commented Jun 25, 2016

@B00ze64 Well, according to their Insider feedback postings, users like this change very much. So I guess it's a personal thing. After all, this is not the right place for Windows bashing and every other OS has their own similar issues, too. T-Clock has always been a hack and probably will until Microsoft adds an API for that. It's about finding a creative way around that. Windows is not Open Source like Linux/KDE where you can spend weeks to change the source code and build it to have your own personal customisation.

@White-Tiger
Copy link
Owner

well.. I'll hope they'll revert most changes and go back to the good old flexible and extendable modular design...
I took a look at the insider build (slow ring) and it seems like the clock got a major downgrade... it's no longer an "independent" entity, it's now fully controlled by the surrounding control (for the main taskbar it's the notify area, and for any additional, it's the entire taskbar that controls the clock)
This means that the clock no longer handles it's size, it simply receives it from the outer control...

So the insider build breaks at least the following:

  • Clock can no longer define its own size (T-Clock could either hook a lot more windows and add wacky code, or write to HKEY_CURRENT_USER\Control Panel\International\sShortTime something like hh:mm tt HH HH HH HH HH HH HH HH HH which is as wide as it can get.. Though the later option messes up other stuff :P)
  • The old calendar got removed, only the new slow HTML calendar is left (T-Clock can't open either calendar as the clock is also no longer responsible. Which also means that T-Clocks ability to restore the old calendar is now useless)
  • T-Clock can't currently display the system's default tooltip as it used to...
  • T-Clock's hover effect is also gone... because the clock is no longer responsible either.
  • T-Clock's secondary taskbar clocks because Windows added their own (which is not a bad change by definition, but requires me to rewrite more stuff for Win10)

I might just skip the "upgrade" to Windows 10... I was thankful that the old calendar was still there because it's working better and faster. I just don't want "everything" to be slow like the search function thanks to Cortana (takes 6 seconds to enter and execute "regedit" even though it should take less than <1), or the explorer who needs about 6 seconds to just exit (Ctrl-Shift-RightClick taskbar)

@ygoe
Copy link
Author
ygoe commented Jun 27, 2016

Well, I hope you're not giving up. The format size is the most important feature for me I guess. I don't need hover effects and other interaction, I have real calendar apps for that. Just reported my sadness to their feedback system. You might want to give it some votes if you like (it's under desktop environment, taskbar).

@qwerty12
Copy link
qwerty12 commented Jul 4, 2016

@White-Tiger

It's not all bad, FWIW 😃

  • With the large taskbar enabled, the time format I personally use manages to just about fit. Although with the small taskbar enabled (a must with my 1366x768 screen), T-Clock hides the notification button with a recent build of Windows 10 (which isn't a problem for me personally since I hide the button myself anyway; all that the notification system is used for is so MS can tell me frequently that I can, in fact, install Office [who knew?!] and for Action Center to tell me endlessly that I've disabled Defender).

  • Only the code from Explorer to start it got removed, but the clock itself is still present. See: windows 10-2016-07-04-02-33-08

    What I have now depends on MS not removing the actual clock. I want to write the contingency code now (I have an idea in mind that may work) so that a workaround is available when if MS remove the actual clock. (Sadly, I have a lot of learning to do for this.)
    Regarding the click: middle-click still works to show the stopwatch. Is there really no way to detect a single-click? (I guess at the worst, SetWinEventHook may work.) Then at least you can show the clock/calendar yourself: it's not really a pretty way IMO but using UI Automation to call DoDefaultAction on the Automation object representing the original clock works to display the "modern" clock (I can't find the way to do it directly for the new clock, but using UIA is far less likely to break anyway). The downside you can't close the displayed clock by calling it again, but I'm not sure that that's a flaw since clicking the original clock keeps showing the calendar over and over again.

  • Enabling T-Clock's custom tooltip works. I've not tested this, but I'm 95% sure I can leverage the mechanism T-Clock uses to show a custom tooltip to show the standard one instead. (Although not I personally require as I already show the day and date on the taskbar anyway.)

  • The hover effect means nothing to me, especially so when compared to T-Clock's ability to fit the short date into the clock when the small taskbar is being used.

  • Again, I'm only thinking of myself, but I only care about the timezone that I'm living in.

I agree with you on the rest re. Windows 10. The only reason I stick around is because of the security improvements like moving font rendering out of the kernel. But if MS mess up the Modern version of File Explorer, I'll be back on WIndows 8 (the only thing I dislike there is the really bad Open With dialog box - but at least I'll have an incentive to read my copy of K&R and actually read Petzold's book to actually learn the WinAPI so that I can replace it...)

EDIT: The only thing is, I don't know how to detect if the workarounds will be needed. I mean, version-wise, it's still Windows 10. Maybe it'll be easy to detect if the upcoming Anniversary Update has been installed...

EDIT 2: Sorry for hijacking this topic. I just wanted to reply to White-Tiger's points.

@ygoe
Copy link
Author
ygoe commented Jul 4, 2016

@qwerty12 You can open the Security Center in the Control Panel and click on "don't show messages about this" below each of the points you don't want to be notified of. It's there since Windows XP SP2. (English names just guessed.)

@White-Tiger
Copy link
Owner
White-Tiger commented Jul 4, 2016

@qwerty12 how did you manage to still call the old calendar? though even if it works, since the registry setting is now gone to enable it, it's likely to be removed anyway as it isn't anymore in use by Windows..

@qwerty12
Copy link
qwerty12 commented Jul 4, 2016

Thanks. I'll remember to look in the Action Center the next time I reinstall Windows...

@White-Tiger
Copy link
Owner

I don't really see a clean way to fix the clock.. like I said.. the clock used to handle the size through window messages which T-Clock could extend upon.
But now, it's all deeply done inside explorer using MFC and the function that's called is: ClockButton::CalculateMinimumSize which also calls ClockButton::CalculateMaxTextSizes and uses the monitor's DPI to calculate the correct size.
There's also:
ClockButton::CalculateMaxTextSize_Time
ClockButton::CalculateMaxTextSize_Date
and
ClockButton::CalculateMaxTextSize_DayOfWeek

all of those are also used for the 2nd+ monitor clock..

Hooking functions isn't what I'd prefer.. as there are some major issues like we'll have to dynamically calculate the functions addresses (probably through function signatures), we'll have to use 3rd party libraries like EasyHook or at least an disassembler to safely hook functions (so our trampoline doesn't cut an instruction in half which would crash) Which all adds lots of code T-Clock never had before and wouldn't even be safe to do nor bullet proof.
So my current idea (while not perfect) is to hook the clock's parent (notify area) and intercept their resize messages to simply add our clock's size difference and after resizing, move the notification button... but this requires us to know the original clock size (shouldn't be an issue) and the code will only handle that single notification button... but nothing else that Microsoft might add in the future without requiring code changes. (or any other app that adds more buttons)
If they'd still use the old (modular) window communications way, it all would still work.. no matter how much they'd add in the future..

Though I'm open for ideas ;) the update hits at the end of the month.. so there's still some time :P (I'm currently more worried about my moths old local changes like the move to Unicode etc.)

@addonszz
Copy link
addonszz commented Jul 18, 2016

White-Tiger "to hook the clock's parent (notify area) and intercept their resize messages to simply add our clock's size difference and after resizing"

Looks a good. At least on my windows, the current clock size is the same as the original. I use T-Clock to fix the spacing waisting the microsoft does. Example, it was like this for eons:
image

Now it is like this:
image

I would just not use the font as bigger because the spacing would be limited, but would still better than the microsoft waisting space solution.

@White-Tiger
Copy link
Owner
White-Tiger commented 8000 Jul 19, 2016

@addonszz this issue doesn't currently apply to you as it doesn't seem like you're using an Windows insider build
The issue will appear on 3rd of August

@White-Tiger
Copy link
Owner

Just an update:

I got at least the clock working again... it's a bit hacky, slower and more intrusive, but seems to get the job done.
Though the hover effect is a different story :P Seems like it'll require changes that only work on Windows 10... so it'll work on 10 (also pre-Anniversary) but looks weird on 8...
I haven't yet looked at the calendar...

@mikolajek
Copy link

Can we then count for some new beta release in the foreseeable future?
What I did for my purposes at the moment, I just removed year from my date (I hate it, btw...). In my case the problem occurs only on my 4K display, the full HD one still manages to display the clock & date correctly, most likely due to relatively bigger space assigned to Windows clock in lower resolutions.

White-Tiger added a commit that referenced this issue Aug 3, 2016
+ clock can now change text color based on hover state (improves high contrast themes)
* also simplified our DrawXPClockHover() to handle different OS cases (instead of us before calling it)
* disabled check for high contrast themes... I don't really remember why I had to add it...

partially fix for #39, #41
White-Tiger added a commit that referenced this issue Aug 3, 2016
* multi-mon clock class renamed to "ClockButton" from (guessed) "SecondaryTrayClockWClass"
* Win8/Win10: our custom clock now "emulates" a Win10 anniversary clock
! fix live-preview setting changes from messing up multi-mon clocks (through full taskbar refresh)

partially fix for #39, #41
White-Tiger added a commit that referenced this issue Aug 3, 2016
White-Tiger added a commit that referenced this issue Aug 3, 2016
* we no longer have to re-position the calendar for multi-mon support, yay!
* updated version.h

partially fix for #39, #41
@White-Tiger
Copy link
Owner

Does that answer your question :P xD

@MrsAngelD
Copy link

Hi, where can I download the updated version with the fix?

@White-Tiger
Copy link
Owner

you couldn't until now ;)
https://github.com/White-Tiger/T-Clock/releases
which also now closes this issue :P

@MrsAngelD
Copy link

Thank you! :)

@mikolajek
Copy link

Works perfectly, that's great!

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

7 participants
0